Skip to content

Commit

Permalink
fix credentials for ajax requests
Browse files Browse the repository at this point in the history
  • Loading branch information
lvaroqui committed Feb 17, 2025
1 parent 7b9a972 commit 81d15fb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions deploy/production/authentik/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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`"
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ http:
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-X-authentik-meta-version
- Authorization
- Authorization
2 changes: 1 addition & 1 deletion deploy/staging/backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions showcase-website/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ client.setConfig({
baseURL: import.meta.server
? runtimeConfig.private_api_base_url
: runtimeConfig.public.api_base_url,
credentials: "include",
});
</script>

Expand Down

0 comments on commit 81d15fb

Please sign in to comment.