Skip to content

Commit

Permalink
[caddy] reroute legacy URIs
Browse files Browse the repository at this point in the history
Fixes #5366
  • Loading branch information
JanKoehnlein authored and roboquat committed Aug 27, 2021
1 parent a1082ec commit 30c56b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/proxy/conf/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ https://{$GITPOD_DOMAIN} {
}
}

@legacy_urls path /github.com/* /gitlab.com/* /bitbucket.org/*
handle @legacy_urls {
redir https://{$GITPOD_DOMAIN}/#{uri} permanent
}

handle_errors {
redir https://{$GITPOD_DOMAIN}/sorry/#Error%20{http.reverse_proxy.status_text} 302
}
Expand Down

0 comments on commit 30c56b8

Please sign in to comment.