Title: configurable url_base to enable httpserve_start with path based routing (for example http://localhost:9999/duckserve/) - enabling simpler reverse proxying · Issue #22 · Query-farm/httpserver · GitHub
Open Graph Title: configurable url_base to enable httpserve_start with path based routing (for example http://localhost:9999/duckserve/) - enabling simpler reverse proxying · Issue #22 · Query-farm/httpserver
X Title: configurable url_base to enable httpserve_start with path based routing (for example http://localhost:9999/duckserve/) - enabling simpler reverse proxying · Issue #22 · Query-farm/httpserver
Description: When experimenting with running the httpserver extensions in a container, I tried putting the duckb CLI with the httpserver extension running behind a reverse proxy. So we then have a service/container running, lets call it "duckserve", ...
Open Graph Description: When experimenting with running the httpserver extensions in a container, I tried putting the duckb CLI with the httpserver extension running behind a reverse proxy. So we then have a service/conta...
X Description: When experimenting with running the httpserver extensions in a container, I tried putting the duckb CLI with the httpserver extension running behind a reverse proxy. So we then have a service/conta...
Opengraph URL: https://github.com/Query-farm/httpserver/issues/22
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"configurable url_base to enable httpserve_start with path based routing (for example http://localhost:9999/duckserve/) - enabling simpler reverse proxying","articleBody":"When experimenting with running the httpserver extensions in a container, I tried putting the duckb CLI with the httpserver extension running behind a reverse proxy. So we then have a service/container running, lets call it \"duckserve\", and it has the httpserver started which binds to 0.0.0.0:9999 for example inside that container. It is not exposed to the outside world / larger network - instead it only accepts connections only from another service, which is a reverse proxy routing the traffic in to the service.\r\n\r\nThe reverse proxy runs in another process/container (running at say :80 and :443), which is exposed to the wider network with a more accessible name. It receives traffic and routes requests like \"https://someserver.org/duckserve\" to the upstream \"duckserve\" service (while taking care of other things like certificates for https etc).\r\n\r\nIt would be nice if the \"duckserve\" service could be configured to be available on a subpath when it is started. To understand the problem, see [this link about reverse proxying a service under a subdir / path based route](https://caddy.community/t/the-subfolder-problem-or-why-cant-i-reverse-proxy-my-app-into-a-subfolder/8575#understanding-the-problem-1).\r\n\r\nIf httpserver could be started with a setting for the “URL Base” it could then be reverse proxied along with other services from just one server under one subdomain/name, rather than requiring a separate subdomain (\"stealing the webroot\") for itself, because the reverse proxy wouldn't be required to \"give up the webroot\" to route traffic specifically to httpserver.\r\n\r\nWould supporting something like `httpserve_start('0.0.0.0', 9999, 'auth', '/duckserve/')` be a possibility? Where the fourth parameter provides the path/route where the service is available (now I believe it is implicitly \"/\" ie the webroot). If so, I guess the web UI may already support it, if it gets the parameter \"url\"? \r\n\r\nNot sure the explanation above makes sense but if it was possible to provide this \"subdir\" at startup it would be possible to reverse proxy the service more easily, I think.\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/mskyttner","@type":"Person","name":"mskyttner"},"datePublished":"2024-12-16T16:57:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/22/httpserver/issues/22"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:70348e44-28d8-b957-d0ed-df91d06a527a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A686:16FA88:16EC4CC:1DFFF08:6982BE33 |
| html-safe-nonce | 98c089f30052a8c8983cfdf168d5883f1e5b422cd2a8ed22bc4abd10a9d9c46e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjg2OjE2RkE4ODoxNkVDNENDOjFERkZGMDg6Njk4MkJFMzMiLCJ2aXNpdG9yX2lkIjoiNDU4Njg5ODQwNjcyMjY4MjQxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 392371edc1e9e56e38180d6cbdb236d8084100ce5a05de2fd15789d6da56515c |
| hovercard-subject-tag | issue:2742913381 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Query-farm/httpserver/22/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae8859df18987b6e6378fc16058122726855ce150aa181d254b070f7abeabea6/Query-farm/httpserver/issues/22 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae8859df18987b6e6378fc16058122726855ce150aa181d254b070f7abeabea6/Query-farm/httpserver/issues/22 |
| og:image:alt | When experimenting with running the httpserver extensions in a container, I tried putting the duckb CLI with the httpserver extension running behind a reverse proxy. So we then have a service/conta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mskyttner |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6741528aa4d4ba81c57bbff8f8cc0de0e9115cb2993431dc9dac8d489f7b4ee |
| turbo-cache-control | no-preview |
| go-import | github.com/Query-farm/httpserver git https://github.com/Query-farm/httpserver.git |
| octolytics-dimension-user_id | 183420031 |
| octolytics-dimension-user_login | Query-farm |
| octolytics-dimension-repository_id | 869750358 |
| octolytics-dimension-repository_nwo | Query-farm/httpserver |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 869750358 |
| octolytics-dimension-repository_network_root_nwo | Query-farm/httpserver |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d080c1322b22304d6fea611572ebc81cf3ab3d8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width