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

387
Views
CSP blocking Websocket server connection

I have a jhipster generated application where I want to add a websocket. Locally everything works, but on the server I'm getting CSP errors. How can this be resolved? I tried adding <meta http-equiv="Content-Security-Policy" content="connect-src *;"> to index.html but it does not help. Nginx is in front of the application as a proxy.

console errors

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In Spring Boot, the CSP is set in java not in index.html, this is why your change had no impact.

If you look at SecurityConfiguration.java in your generated project, you'll see this line:

.contentSecurityPolicy(jHipsterProperties.getSecurity().getContentSecurityPolicy())

It means that the CSP is directly copied from application properties under jhipster.security.content-security-policy key.

So, just edit application.yml to change it.

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