diff --git a/deploy/production/authentik/docker-compose.yaml b/deploy/production/authentik/docker-compose.yaml index 3492980..86d8079 100644 --- a/deploy/production/authentik/docker-compose.yaml +++ b/deploy/production/authentik/docker-compose.yaml @@ -3,7 +3,7 @@ services: image: docker.io/library/postgres:16-alpine restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] start_period: 20s interval: 30s retries: 5 @@ -21,7 +21,7 @@ services: command: --save 60 1 --loglevel warning restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "redis-cli ping | grep PONG"] + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] start_period: 20s interval: 30s retries: 5 @@ -46,6 +46,7 @@ services: - traefik.http.routers.authentik.rule=Host(`auth.tangram-orchestre.fr`) - traefik.http.routers.authentik.tls=true - traefik.http.routers.authentik.tls.certresolver=resolver + - traefik.http.routers.authentik.middlewares=authentik-cors@file volumes: - /opt/docker-volumes/authentik/icons:/icons - /opt/docker-volumes/authentik/media:/media diff --git a/deploy/production/traefik/dynamic-conf/authentik-cors-middleware.yaml b/deploy/production/traefik/dynamic-conf/authentik-cors-middleware.yaml new file mode 100644 index 0000000..5131d7c --- /dev/null +++ b/deploy/production/traefik/dynamic-conf/authentik-cors-middleware.yaml @@ -0,0 +1,8 @@ +http: + middlewares: + authentik-cors: + headers: + # accesscontrolallowmethods: "GET,OPTIONS,PUT" + # accesscontrolallowheaders: "*" + accessControlAllowOriginList: https://auth.tangram-orchestre.fr,https://api.staging.tangram-orchestre.fr,https://www.staging.tangram-orchestre.fr" + # accessControlAllowOriginListRegex: "^https://.+\\.tangram-orchestre\\.fr`" \ No newline at end of file diff --git a/deploy/production/traefik/dynamic-conf/authentik-middleware.yaml b/deploy/production/traefik/dynamic-conf/authentik-middleware.yaml index 3bd8ce8..9e7aecb 100644 --- a/deploy/production/traefik/dynamic-conf/authentik-middleware.yaml +++ b/deploy/production/traefik/dynamic-conf/authentik-middleware.yaml @@ -16,4 +16,4 @@ http: - X-authentik-meta-provider - X-authentik-meta-app - X-authentik-meta-X-authentik-meta-version - - Authorization \ No newline at end of file + - Authorization diff --git a/deploy/staging/backend/docker-compose.yaml b/deploy/staging/backend/docker-compose.yaml index 170ec9c..da83719 100644 --- a/deploy/staging/backend/docker-compose.yaml +++ b/deploy/staging/backend/docker-compose.yaml @@ -12,4 +12,4 @@ services: - "traefik.http.routers.backend.rule=Host(`api.staging.tangram-orchestre.fr`)" - traefik.http.routers.backend.tls=true - traefik.http.routers.backend.tls.certresolver=resolver - - traefik.http.routers.backend.middlewares=authentik@file + - traefik.http.routers.backend.middlewares=authentik-cors@file,authentik@file diff --git a/showcase-website/app.vue b/showcase-website/app.vue index d7aa801..3f34f8e 100644 --- a/showcase-website/app.vue +++ b/showcase-website/app.vue @@ -38,6 +38,7 @@ client.setConfig({ baseURL: import.meta.server ? runtimeConfig.private_api_base_url : runtimeConfig.public.api_base_url, + credentials: "include", });