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

236
Views
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?

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