Closed
Description
Is your feature request related to a problem? Please describe
Adding custom headers similar to how it is done for any reverse proxy. An example would be adding custom auth headers when developing applications. An alternative is to have a reverse proxy (like an nginx) in front of the application but since Gitpod is already proxying requests, it is best suited to have it in the same layer.
Describe the behaviour you'd like
The feature should allow for
- Adding custom headers
- Removing/modifying default Gitpod headers (useful when setting a cookie header)
Adding a header to service for all requests to a service could be something like
# Commands to start on workspace startup
tasks:
- init: yarn install
command: yarn build
# Ports to expose on workspace startup
ports:
- port: 8000
onOpen: open-preview
headers:
- X-my-header my-header-content;
Here, headers expects an array. Adding a header that is already part of the Gitpod headers will lead to an updated header. I am not sure how the delete feature can work.
Additional context
Related Issues
- This issue was reported by myself on Discord [1].
- [ws-proxy] Add X-Forwarded-Port header #11110.