diff options
Diffstat (limited to '')
-rw-r--r-- | src/http.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http.zig b/src/http.zig index bccfcce3e..f101b5b38 100644 --- a/src/http.zig +++ b/src/http.zig @@ -129,6 +129,11 @@ pub const RequestContext = struct { if (protocol == null) { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto determine_protocol: { + if (this.header("Upgrade-Insecure-Requests") != null) { + protocol = "https"; + break :determine_protocol; + } + if (this.header("X-Forwarded-Proto")) |proto| { if (strings.eqlComptime(proto, "https")) { protocol = "https"; |