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

247
Visualizações
Content Security Policy : HTTP vs HTTPS on connect-src 'self'

I'm looking at a site (https://www.somestore.com) where an XHR/ajax request to http://www.somestore.com is getting blocked by the Content Security Policy. Note that the site operates under HTTPS and the ajax request is over HTTP.

This site's CSP policy lists self and the store's domain name without the protocol type:

connect-src 'self' www.somestore.com

Chrome is reporting

Refused to connect to 'http://www.somestore.com/...' because it violates the following Content Security Policy directive: "connect-src 'self' www.somestore.com.

I don't access to the server to run tests, but at a glance, it seems that the directive should not interfere with the ajax request, but CSP seems to distinguishes between HTTP and HTTPS and treat them as different origins. I could not find any info regarding this online.

My hunch is that www.somestore.com can be removed from the directive and the ajax should be changed to HTTPS, and this problem would go away. Any idea?

over 4 years ago · Santiago Trujillo
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