Load balancer returning MIME type mismatch

0

Environment:

  • a domain on Route 53 pointing to cloudfront distribution
  • the distribution have an ALB as origin and cache all the requests
  • the ALB receives the requests and forward to 2 ECS services (depending on the url path)
    • one listener to redirect all http access to https
    • one https listener with rules for each service
  • ECS have 2 services, appA (Nuxt3) and appB (Nuxt2)

What I want: I want all the access through 'de/' routes being forward to appA and all access through 'en/' being forward to appB.

What I tried: I tried to create a rule in my ALB sending requests from 'de/' to appA and the default access to appB. It works in terms of access the content, but appA start to failing in various components giving me the same error message: "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec". The application is fine, when I run locally works ok. When I try the opposite (rule for 'en/' -> appB and default access -> appA) then appB starts with the same error so I doesnt seen like a app problem.

Any ideas how to solve this?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠