Skip to content

Commit 2071284

Browse files
Andrew Farriesroboquat
Andrew Farries
authored andcommitted
Pre-flight /auth endpoints
1 parent d0a63ed commit 2071284

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

components/proxy/conf/Caddyfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,25 @@ https://{$GITPOD_DOMAIN} {
314314
handle @to_server {
315315
import compression
316316

317-
reverse_proxy server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
317+
forward_auth server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
318+
uri /feature-flags/slow-database
319+
copy_headers X-Gitpod-Slow-Database
320+
}
321+
322+
@slow {
323+
header X-Gitpod-Slow-Database "true"
324+
}
325+
326+
@fast {
327+
not header X-Gitpod-Slow-Database "true"
328+
}
329+
330+
reverse_proxy @fast server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
331+
import upstream_headers
332+
import upstream_connection
333+
}
334+
335+
reverse_proxy @slow slow-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
318336
import upstream_headers
319337
import upstream_connection
320338
}

0 commit comments

Comments
 (0)