Skip to content

[public-api] Caddy serves gRPC port instead of http #9482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2022
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
22 changes: 17 additions & 5 deletions components/proxy/conf/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
order gitpod.workspace_download before redir
order gitpod.headless_log_download before rewrite
order gitpod.sec_websocket_key before header

servers {
protocol {
allow_h2c
}
}
}

(compression) {
Expand Down Expand Up @@ -136,6 +142,17 @@
}
}

# public-api
api.{$GITPOD_DOMAIN} {
log {
level DEBUG
output stdout
}

reverse_proxy h2c://public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9001
}


# always redirect to HTTPS
http:// {
redir https://{host}{uri} permanent
Expand Down Expand Up @@ -262,11 +279,6 @@ https://{$GITPOD_DOMAIN} {
}
}

# public-api
https://api.{$GITPOD_DOMAIN} {
reverse_proxy public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9000
}

# workspaces
https://*.*.{$GITPOD_DOMAIN} {
import enable_log
Expand Down