Content-Security-Policy error in JHipster generated Angular application

Viewed 932

I have a JHispter generated application. I removed useHash property in RouterModule:

imports: [
    ...,
    RouterModule.forRoot(routes)
],

After I navigate to a view and hit refresh, I get following error:

Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'".

In an ordinary angular-cli generated application, the view is displayed without any errors when you hit refresh.

Why Content-Security-Policy error is encountered in JHipster generated application when you disable useHash?

0 Answers
Related