Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

284
Vistas
Content Security Policy not working correctly

I've got a problem. I want to load a video in webm format through js, but localhost don't load the video due to CSP

Refused to load media from 'http://localhost:8079/Talking.webm' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'media-src' was not explicitly set, so 'default-src' is used as a fallback.

I tried to add <meta http-equiv="Content-Security-Policy" content="base-uri 'self'; connect-src 'self'; default-src 'self'; font-src 'self'; frame-src 'self'; img-src 'self'; manifest-src 'self'; media-src 'self'; object-src 'none'; script-src 'report-sample' 'self'; style-src 'report-sample' 'self'; worker-src 'none';"> but localhost 4some reason loads default-src 'none' instead of default-src 'self' and ofcourse doesn't find other meta. I would say localhost just ignore this meta tag.

Video is rendered good, because when i start only index.html the video loads correctly. Each script from js file (only one file) is working correctly except video.

I tried to add video through index.html and through js new video tag create if new user joins, but in this way it didn't load any video so video from index.html wasn't loaded too.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Content needs to pass all your policies, and adding another policy in meta (or header) does not relax other policies, it is still blocked by the same policy with "default-src 'none'". You will need to identify the preexisting policy and add a media-src directive that allows your content.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda