🔧(project) proxy Keycloak with nginx

Backend and Frontend send requests to Keycloak through Nginx.

Thus, all requests from frontend and backend shared a same host
when received by Keycloak.

Otherwise, the flow is initiated from http://localhost:8080. When the Backend
calls token endpoint from Keycloak container at http://keycloak:8080,
the JWT token issuer and sender are mismatching.
This commit is contained in:
Lebaud Antoine
2024-02-14 22:42:20 +01:00
committed by aleb_the_flash
parent 699854e76b
commit 927d0e5a22
2 changed files with 22 additions and 0 deletions

View File

@@ -32,3 +32,17 @@ server {
}
}
server {
listen 8083;
server_name localhost;
charset utf-8;
location / {
proxy_pass http://keycloak:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}