Skip to content

Commit

Permalink
dropping any http:// access to control plane. no longer allowing http…
Browse files Browse the repository at this point in the history
…:// only "alt ports"
  • Loading branch information
traceypooh committed Nov 1, 2024
1 parent 3b24213 commit 1e89321
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions etc/Caddyfile.ctmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ https://{{- . }} {
{{ end }}
log
}
http://{{- . }} {
redir https://{host}{uri} permanent
}
{{ end }}


Expand Down Expand Up @@ -82,10 +79,9 @@ http://{{ $hosty }} {



# NOTE: three styles of possible origins:
# NOTE: two styles of possible origins:
# https://av.dev.archive.org
# https://av.dev.archive.org:5432
# http://av.dev.archive.org:5432

# NOTE: `trusted_proxies` is for `X-Forwarded-Host` header from something like nginx `proxy_pass`.
# NOTE: `@hsts-on` allows for requests coming in over http:// from something like nginx `proxy_pass`
Expand Down Expand Up @@ -141,20 +137,6 @@ http://{{ $origin | regexReplaceAll "^https://" "" }} {
log
}
{{- end -}}


{{- else if $origin | regexMatch "^http://" -}}


# (rare) HTTP only port
{{ $origin }} {
reverse_proxy {{ range $services }} {{ .Address }}:{{ .Port }} {{ end }} {
lb_policy least_conn
}
log
}


{{- end -}}
{{- end -}}
{{- end }}

0 comments on commit 1e89321

Please sign in to comment.