Skip to content

Commit

Permalink
* fixing setting the correct scheme fro keycloak reoute
Browse files Browse the repository at this point in the history
  • Loading branch information
h2Entwicklung committed Dec 8, 2024
1 parent 6bd7d71 commit 6e049e9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

###> symfony/framework-bundle ###
APP_ENV=prod
APP_SCHEME=https
APP_DEBUG=0
APP_SECRET=8049593567e0d8a5319abd1960f937f3
TRUSTED_PROXIES=0.0.0.0/0
Expand Down
4 changes: 3 additions & 1 deletion config/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ connect_keycloak_check:
path: /login/keycloak_login/check
controller: App\Controller\LoginControllerKeycloak::check


when@prod:
connect_keycloak_check:
path: /login/keycloak_login/check
controller: App\Controller\LoginControllerKeycloak::check
schemes: [https]
schemes: ['%app.scheme%']


controllers:
resource: '../src/Controller/'
Expand Down
3 changes: 0 additions & 3 deletions config/routes/dev/keycloak.yml

This file was deleted.

4 changes: 0 additions & 4 deletions config/routes/prod/keycloak.yml

This file was deleted.

4 changes: 3 additions & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
app.path.images: /uploads/images/products

secret: '%env(APP_SECRET)%'
akademieEmail: '%env(AKADEMIE_EMAIL)%'
defaultEmail: '%env(DEFAULT_EMAIL)%'
Expand All @@ -15,6 +15,8 @@ parameters:
KEYCLOAK_SECRET: '%env(OAUTH_KEYCLOAK_CLIENT_SECRET)%'
KEYCLOAK_ID: '%env(OAUTH_KEYCLOAK_CLIENT_ID)%'
superAdminRole: '%env(superAdminRole)%'
app.scheme: '%env(APP_SCHEME)%'
app.path.images: /uploads/images/products
services:
# default configuration for services in *this* file
_defaults:
Expand Down
1 change: 1 addition & 0 deletions installOdcDocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export KEYCLOAK_PW=$KEYCLOAK_PW
export ODC_DB_PW=$ODC_DB_PW
export KEYCLOAK_ADMIN_PW=$KEYCLOAK_ADMIN_PW
export registerEmailAdress=$smtpFrom
export APP_SCHEME=$HTTP_METHOD
RANDOMTAG=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1);
export RANDOMTAG

Expand Down

0 comments on commit 6e049e9

Please sign in to comment.