Skip to content

Commit

Permalink
[proxy] Re-direct mechanism controlled by env var MAINTENANCE_REDIRECT
Browse files Browse the repository at this point in the history
  • Loading branch information
geropl committed Sep 21, 2023
1 parent 48732b7 commit 79367c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/proxy/conf/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ https://{$GITPOD_DOMAIN} {
import ssl_configuration
import security_headers

# maintenance redirect (+ redirect away afterwards)
@maintenance_redirect {
expression `'{$MAINTENANCE_REDIRECT}' == 'true'`
not path /maintenance/*
}
handle @maintenance_redirect {
redir https://{$GITPOD_DOMAIN}/maintenance/index.html 307
}
@maintenance_done_redirect {
expression `'{$MAINTENANCE_REDIRECT}' != 'true'`
path /maintenance/*
}
handle @maintenance_done_redirect {
redir https://{$GITPOD_DOMAIN}/workspaces permanent
}

@proxy_server_public_api path /public-api/gitpod.experimental.v1.HelloService*
handle @proxy_server_public_api {
uri strip_prefix /public-api
Expand Down

0 comments on commit 79367c5

Please sign in to comment.