June 19, 2023
Workspaces forward ports using the HTTPS protocol
In Gitpod, you can now expose ports from your workspace running with HTTPS.
Previously, HTTPS ports exposed in a workspace would show a “port not found” page when accessed. You can configure the port protocol either in your gitpod.yml or via the Gitpod CLI.
Configuring a port protocol in .gitpod.yml
To ensure a port is always configured with a specific protocol you can update the ports definition block in .gitpod.yml as below. Updating your .gitpod.yml is the preferred approach to using the gp CLI (see below), as the .gitpod.yml is declarative and ensures workspaces are created repeatably.
ports:
- name: Frontend Application
port: 3000
protocol: httpsDynamically updating port protocols with gp
You can dynamically change the protocol of a port using the gp ports protocol command.
For example, gp ports protocol 3000:https will change port 3000 to use https.
Or, gp ports protocol 3000:http will change port 3000 to use http. By default, ports are set as HTTP.
See configuring ports, Gitpod CLI gitpod.yml for more.