fix(kong): persist Supabase CORS config
This commit is contained in:
parent
b758b40d85
commit
bc674ea696
@ -44,6 +44,41 @@ services:
|
|||||||
- /auth/v1/verify
|
- /auth/v1/verify
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: auth-v1-open-callback
|
- name: auth-v1-open-callback
|
||||||
url: http://auth:9999/callback
|
url: http://auth:9999/callback
|
||||||
routes:
|
routes:
|
||||||
@ -53,6 +88,41 @@ services:
|
|||||||
- /auth/v1/callback
|
- /auth/v1/callback
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: auth-v1-open-authorize
|
- name: auth-v1-open-authorize
|
||||||
url: http://auth:9999/authorize
|
url: http://auth:9999/authorize
|
||||||
routes:
|
routes:
|
||||||
@ -62,7 +132,41 @@ services:
|
|||||||
- /auth/v1/authorize
|
- /auth/v1/authorize
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
## Secure Auth routes
|
## Secure Auth routes
|
||||||
- name: auth-v1
|
- name: auth-v1
|
||||||
_comment: 'GoTrue: /auth/v1/* -> http://auth:9999/*'
|
_comment: 'GoTrue: /auth/v1/* -> http://auth:9999/*'
|
||||||
@ -74,6 +178,41 @@ services:
|
|||||||
- /auth/v1/
|
- /auth/v1/
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: key-auth
|
- name: key-auth
|
||||||
config:
|
config:
|
||||||
hide_credentials: false
|
hide_credentials: false
|
||||||
@ -95,6 +234,41 @@ services:
|
|||||||
- /rest/v1/
|
- /rest/v1/
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: key-auth
|
- name: key-auth
|
||||||
config:
|
config:
|
||||||
hide_credentials: true
|
hide_credentials: true
|
||||||
@ -116,6 +290,41 @@ services:
|
|||||||
- /graphql/v1
|
- /graphql/v1
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: key-auth
|
- name: key-auth
|
||||||
config:
|
config:
|
||||||
hide_credentials: true
|
hide_credentials: true
|
||||||
@ -143,6 +352,41 @@ services:
|
|||||||
- /realtime/v1/
|
- /realtime/v1/
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: key-auth
|
- name: key-auth
|
||||||
config:
|
config:
|
||||||
hide_credentials: false
|
hide_credentials: false
|
||||||
@ -163,6 +407,41 @@ services:
|
|||||||
- /realtime/v1/api
|
- /realtime/v1/api
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
- name: key-auth
|
- name: key-auth
|
||||||
config:
|
config:
|
||||||
hide_credentials: false
|
hide_credentials: false
|
||||||
@ -183,7 +462,42 @@ services:
|
|||||||
- /storage/v1/
|
- /storage/v1/
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
- x-upsert
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
## Edge Functions routes
|
## Edge Functions routes
|
||||||
- name: functions-v1
|
- name: functions-v1
|
||||||
_comment: 'Edge Functions: /functions/v1/* -> http://functions:9000/*'
|
_comment: 'Edge Functions: /functions/v1/* -> http://functions:9000/*'
|
||||||
@ -195,7 +509,41 @@ services:
|
|||||||
- /functions/v1/
|
- /functions/v1/
|
||||||
plugins:
|
plugins:
|
||||||
- name: cors
|
- name: cors
|
||||||
|
config:
|
||||||
|
origins:
|
||||||
|
- "https://app.classroomcopilot.ai"
|
||||||
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
|
methods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
headers:
|
||||||
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
|
- apikey
|
||||||
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
|
exposed_headers:
|
||||||
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
|
credentials: true
|
||||||
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
## Analytics routes
|
## Analytics routes
|
||||||
- name: analytics-v1
|
- name: analytics-v1
|
||||||
_comment: 'Analytics: /analytics/v1/* -> http://logflare:4000/*'
|
_comment: 'Analytics: /analytics/v1/* -> http://logflare:4000/*'
|
||||||
@ -243,25 +591,41 @@ services:
|
|||||||
- name: cors
|
- name: cors
|
||||||
config:
|
config:
|
||||||
origins:
|
origins:
|
||||||
- "http://localhost:3000"
|
- "https://app.classroomcopilot.ai"
|
||||||
- "http://127.0.0.1:3000"
|
- "https://api.classroomcopilot.ai"
|
||||||
|
- "http://192.168.0.74"
|
||||||
|
- "http://localhost:3000" # keep for local dev if needed
|
||||||
|
- "http://localhost:5173" # vite default
|
||||||
- "http://192.168.0.94:50001"
|
- "http://192.168.0.94:50001"
|
||||||
|
- "http://192.168.0.74"
|
||||||
methods:
|
methods:
|
||||||
- GET
|
- GET
|
||||||
- POST
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
- DELETE
|
- DELETE
|
||||||
- OPTIONS
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
headers:
|
headers:
|
||||||
- Accept
|
- Accept
|
||||||
|
- Accept-Profile
|
||||||
- Authorization
|
- Authorization
|
||||||
- Content-Type
|
- Content-Type
|
||||||
|
- Content-Profile
|
||||||
- X-Client-Info
|
- X-Client-Info
|
||||||
|
- X-Supabase-Api-Version
|
||||||
- apikey
|
- apikey
|
||||||
- Mcp-Session-Id
|
- Prefer
|
||||||
|
- Range
|
||||||
|
- Range-Unit
|
||||||
|
- X-Requested-With
|
||||||
exposed_headers:
|
exposed_headers:
|
||||||
- Mcp-Session-Id
|
- Content-Range
|
||||||
|
- Content-Profile
|
||||||
|
- X-Total-Count
|
||||||
credentials: true
|
credentials: true
|
||||||
max_age: 3600
|
max_age: 3600
|
||||||
|
preflight_continue: false
|
||||||
|
|
||||||
## Protected Dashboard - catch all remaining routes
|
## Protected Dashboard - catch all remaining routes
|
||||||
#- name: dashboard
|
#- name: dashboard
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user