mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
fix(nix): force http:// scheme on bundled caddy site address (#2485)
A bare `host:port` site address lets Caddy pick the listener scheme by port heuristic, which fights `auto_https off` and surfaces as TLS errors when the browser hits plain HTTP on a non-standard port. Hardcode the `http://` prefix in both the Home Manager and NixOS Caddyfile templates — the bundled proxy is plaintext-only by design, so users who need TLS run their own front-end with `webFrontend.enable = false`.
This commit is contained in:
parent
ce95266586
commit
7b1cc16988
2 changed files with 6 additions and 2 deletions
|
|
@ -54,6 +54,10 @@
|
||||||
# in browsers (same failure mode QUICKSTART.md calls out for
|
# in browsers (same failure mode QUICKSTART.md calls out for
|
||||||
# nginx).
|
# nginx).
|
||||||
# * generous read/write timeouts for long-running streams.
|
# * generous read/write timeouts for long-running streams.
|
||||||
|
#
|
||||||
|
# Site address is explicitly `http://` — a bare `host:port` lets Caddy
|
||||||
|
# pick the listener scheme by port, which collides with `auto_https
|
||||||
|
# off` and surfaces as TLS errors when the browser hits plain HTTP.
|
||||||
caddyfile = pkgs.writeText "open-design-web.Caddyfile" ''
|
caddyfile = pkgs.writeText "open-design-web.Caddyfile" ''
|
||||||
{
|
{
|
||||||
auto_https off
|
auto_https off
|
||||||
|
|
@ -61,7 +65,7 @@
|
||||||
persist_config off
|
persist_config off
|
||||||
}
|
}
|
||||||
|
|
||||||
${cfg.webFrontend.host}:${toString cfg.webFrontend.port} {
|
http://${cfg.webFrontend.host}:${toString cfg.webFrontend.port} {
|
||||||
handle /api/* {
|
handle /api/* {
|
||||||
reverse_proxy 127.0.0.1:${toString cfg.port} {
|
reverse_proxy 127.0.0.1:${toString cfg.port} {
|
||||||
flush_interval -1
|
flush_interval -1
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
persist_config off
|
persist_config off
|
||||||
}
|
}
|
||||||
|
|
||||||
${cfg.webFrontend.host}:${toString cfg.webFrontend.port} {
|
http://${cfg.webFrontend.host}:${toString cfg.webFrontend.port} {
|
||||||
handle /api/* {
|
handle /api/* {
|
||||||
reverse_proxy 127.0.0.1:${toString cfg.port} {
|
reverse_proxy 127.0.0.1:${toString cfg.port} {
|
||||||
flush_interval -1
|
flush_interval -1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue