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

132
Visualizações
Static js deployed to different server - Content Security Policy

We have some javascript libraries and other static content that are used by many different apps on different servers. We want to deploy one location where they can be loaded from by the pages.

Naturally, this means we get blocked-CSP (Content Security Policy). The server name is replace by static-server below. Note that the content is on port 9081 in dev, but I've tried with and without that port specifier in each of the below. I have tried adding the target server to a meta tag:

meta http-equiv="Content-Security-Policy"
  content="default-src 'self'; img-src http://static-server*; child-src 'none';"

I tried adding it to the Content-Security-Policy HTTP header that we already have

default-src 'self' 'unsafe-inline' 'unsafe-eval'  https://www.google.com https://www.gstatic.com https://fonts.gstatic.com https://fonts.googleapis.com http://dev-afmsinet-12;img-src 'self' data:   https://www.google.com https://www.gstatic.com https://fonts.gstatic.com https://fonts.googleapis.com http://dev-afmsinet-12;font-src 'self' data:  https://www.google.com https://www.gstatic.com https://fonts.gstatic.com https://fonts.googleapis.com http://static-server;

I also tried adding a Access-Control-Allow-Origin HTTP header.

http://static-server*

How can I get this to work? We just don't want to be deploying these same libraries over and over with each app.

about 4 years ago · Juan Pablo Isaza
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