Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 40 additions & 53 deletions internal/start/templates/kong.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_format_version: "1.1"
services:
# Tenant project endpoints
- name: auth-v1-open
_comment: "GoTrue: /auth/v1/verify* -> http://auth:9999/verify*"
url: http://{{ .GotrueId }}:9999/verify
Expand All @@ -10,11 +11,6 @@ services:
- /auth/v1/verify
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: auth-v1-open-callback
_comment: "GoTrue: /auth/v1/callback* -> http://auth:9999/callback*"
url: http://{{ .GotrueId }}:9999/callback
Expand All @@ -25,11 +21,6 @@ services:
- /auth/v1/callback
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: auth-v1-open-authorize
_comment: "GoTrue: /auth/v1/authorize* -> http://auth:9999/authorize*"
url: http://{{ .GotrueId }}:9999/authorize
Expand All @@ -40,21 +31,6 @@ services:
- /auth/v1/authorize
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: well-known-oauth
_comment: "GoTrue: /.well-known/oauth-authorization-server -> http://auth:9999/.well-known/oauth-authorization-server"
url: http://{{ .GotrueId }}:9999/.well-known/oauth-authorization-server
routes:
- name: well-known-oauth
strip_path: true
paths:
- /.well-known/oauth-authorization-server
plugins:
- name: cors
- name: auth-v1
_comment: "GoTrue: /auth/v1/* -> http://auth:9999/*"
url: http://{{ .GotrueId }}:9999/
Expand All @@ -65,11 +41,7 @@ services:
- /auth/v1/
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
# TODO: validate apikey
- name: rest-v1
_comment: "PostgREST: /rest/v1/* -> http://rest:3000/*"
url: http://{{ .RestId }}:3000/
Expand All @@ -82,6 +54,9 @@ services:
- name: cors
- name: request-transformer
config:
add:
headers:
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
Expand All @@ -95,11 +70,7 @@ services:
- /rest-admin/v1/
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
# TODO: validate apikey
- name: graphql-v1
_comment: "PostgREST: /graphql/v1 -> http://rest:3000/rpc/graphql"
url: http://{{ .RestId }}:3000/rpc/graphql
Expand All @@ -115,6 +86,7 @@ services:
add:
headers:
- "Content-Profile: graphql_public"
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
Expand Down Expand Up @@ -147,6 +119,9 @@ services:
- name: cors
- name: request-transformer
config:
add:
headers:
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
Expand All @@ -163,6 +138,9 @@ services:
- name: cors
- name: request-transformer
config:
add:
headers:
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
Expand All @@ -178,17 +156,12 @@ services:
- name: cors
- name: request-transformer
config:
add:
headers:
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: pg-meta
_comment: "pg-meta: /pg/* -> http://pg-meta:8080/*"
url: http://{{ .PgmetaId }}:8080/
routes:
- name: pg-meta-all
strip_path: true
paths:
- /pg/
- name: functions-v1
_comment: "Functions: /functions/v1/* -> http://edge-runtime:8081/*"
url: http://{{ .EdgeRuntimeId }}:8081/
Expand All @@ -204,9 +177,33 @@ services:
- name: cors
- name: request-transformer
config:
add:
headers:
- "Authorization: {{ .BearerToken }}"
replace:
headers:
- "Authorization: {{ .BearerToken }}"
# Management API endpoints
- name: well-known-oauth
_comment: "GoTrue: /.well-known/oauth-authorization-server -> http://auth:9999/.well-known/oauth-authorization-server"
url: http://{{ .GotrueId }}:9999/.well-known/oauth-authorization-server
routes:
- name: well-known-oauth
strip_path: true
paths:
- /.well-known/oauth-authorization-server
plugins:
- name: cors
- name: pg-meta
_comment: "pg-meta: /pg/* -> http://pg-meta:8080/*"
url: http://{{ .PgmetaId }}:8080/
routes:
- name: pg-meta-all
strip_path: true
paths:
- /pg/
plugins:
- name: cors
- name: analytics-v1
_comment: "Analytics: /analytics/v1/* -> http://logflare:4000/*"
url: http://{{ .LogflareId }}:4000/
Expand All @@ -217,11 +214,6 @@ services:
- /analytics/v1/
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: pooler-v2-ws
_comment: "Pooler: /pooler/v2/* -> ws://pooler:4000/v2/*"
url: http://{{ .PoolerId }}:4000/v2
Expand All @@ -233,11 +225,6 @@ services:
- /pooler/v2/
plugins:
- name: cors
- name: request-transformer
config:
replace:
headers:
- "Authorization: {{ .BearerToken }}"
- name: mcp
_comment: "MCP: /mcp -> http://studio:3000/api/mcp"
url: http://{{ .StudioId }}:3000/api/mcp
Expand Down
Loading