- Notifications
You must be signed in to change notification settings - Fork928
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Given a python app with fastapi which serves the api docs athttp://localhost:8000/docs.
This coder_app:
resource "coder_app" "api" { agent_id = coder_agent.main.id slug = "api" icon = "https://upload.wikimedia.org/wikipedia/commons/a/a6/Api_logo.jpg" url = "http://localhost:8000/docs" subdomain = true share = "authenticated" healthcheck { url = "http://localhost:8000/ping" interval = 10 threshold = 30 }}
Generates this url:
https://my-subdomain-url/# Which is redirect tohttps://my-subdomain-url/docs
On the server side this happens:
INFO: 10.0.23.3:0 - "GET /docs/ HTTP/1.1" 307 Temporary RedirectINFO: 10.0.23.3:0 - "GET /docs/docs HTTP/1.1" 404 Not Found
When usingurl = "http://localhost:8000"
and manually appending/docs
to generated http link it works fine.
It seems there is an issue with the subdomain url generation.
Relevant Log Output
Expected Behavior
A generated subdomain url which opens the specified subfolder.
Steps to Reproduce
Add coder_app with a subdomain enabled url pointing to a subfolder as above.
Environment
- Host OS: Ubuntu 22.04
- Coder version: 2.23.1
Additional Context
No response