Skip to content

Commit

Permalink
docs: added missing CORS headers for regular keycloak access via AJAX (
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderwolz authored May 13, 2023
1 parent ba322e0 commit bc80050
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/token-auth-keycloak/conf/proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ server {
add_header WWW-Authenticate 'Basic realm="Keycloak login"' always;
return 401;
}

add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods "OPTIONS, GET" always;
add_header Access-Control-Allow-Headers "Content-Type, Accept, Authorization" always;
add_header Access-Control-Allow-Credentials true always;
proxy_pass $keycloak;
}

Expand Down

0 comments on commit bc80050

Please sign in to comment.