mauriciovigolo / keycloak-angular

Easy Keycloak setup for Angular applications.
MIT License
725 stars 278 forks source link

Refused to display 'http://localhost:8080/' error #469

Open razvan-zamfir-rsystems opened 1 year ago

razvan-zamfir-rsystems commented 1 year ago

After following the installation guide for an Angular 14 app, the browser shows

Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'deny'.

Since then, http://localhost:4200/ shows a blank page.

Why?

tuytoosh commented 9 months ago

You need to ask Keycloak to give the iframe loading access to your client. Go to Realm setting > Security defences > Content-Security-Policy and add your host:

frame-ancestors 'self' http://localhost:4200;