Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
How do I set up a ServiceWorker on amazon S3?

I am trying to set up the service worker for a SPA I am making. Its hosted on AWS with S3.

Despite the file being in the correct place I still get the following errors

/service-worker.js:1 The script has an unsupported MIME type ('text/js'). https://djwdy6bk7t99o.cloudfront.net/service-worker.js

Failed to load resource: net::ERR_INSECURE_RESPONSE

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The service worker specification requires that the response for the service worker JavaScript file used in the registration be served with a "JavaScript MIME type" (e.g., Content-Type: application/javascript) header.

That's what I'd expect the default to be for files served by S3 with a .js extension, but perhaps you've previously overridden the default settings? This answer has some details about changing that setting back.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda