Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
Static js implementado en un servidor diferente - Política de seguridad de contenido

Tenemos algunas bibliotecas de JavaScript y otro contenido estático que utilizan muchas aplicaciones diferentes en diferentes servidores. Queremos implementar una ubicación desde donde las páginas puedan cargarlos.

Naturalmente, esto significa que nos bloquean-CSP (Política de seguridad de contenido). El nombre del servidor se reemplaza por static-server a continuación. Tenga en cuenta que el contenido está en el puerto 9081 en desarrollo, pero lo he intentado con y sin ese especificador de puerto en cada uno de los siguientes. He intentado agregar el servidor de destino a una metaetiqueta:

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

Intenté agregarlo al encabezado HTTP Content-Security-Policy que ya tenemos

 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;

También intenté agregar un encabezado HTTP Access-Control-Allow-Origin.

 http://static-server*

¿Cómo puedo hacer que esto funcione? Simplemente no queremos implementar estas mismas bibliotecas una y otra vez con cada aplicación.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!