Skip to content

policy: strip default ports from input.http.host - #4065

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:policy/http-host-default-ports
Open

policy: strip default ports from input.http.host#4065
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:policy/http-host-default-ports

Conversation

@locker95

@locker95 locker95 commented Sep 9, 2026

Copy link
Copy Markdown

curl (and a few other tools) put :443 / :80 on the URL even when you didn't type it. policy then sees input.http.host as example.com:443, so an allow-list of example.com misses it.

drop those well-known ports when filling input.http.host. anything else (:8443, etc) stays.

Fixes #4061

curl and similar tools include :443/:80 on the request URL. Policy then
sees input.http.host as example.com:443, so an allow-list of example.com
misses it. Drop those well-known ports; leave any other port in place.

Fixes docker#4061

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPA policies should normalize input.http.host for well-known ports

1 participant