Skip to content

HTTP: add an optional allow list to the proxy#558

Merged
djs55 merged 9 commits intomoby:masterfrom
djs55:http-proxy-allow-list
Mar 2, 2022
Merged

HTTP: add an optional allow list to the proxy#558
djs55 merged 9 commits intomoby:masterfrom
djs55:http-proxy-allow-list

Conversation

@djs55
Copy link
Copy Markdown
Collaborator

@djs55 djs55 commented Feb 5, 2022

This allows an admin to set an allow list, such that requests for other domains / CIDRs / IPs will be blocked.

It re-uses the existing HTTP exclude matching functions.

There is still some work needed to distinguish the case None and Some [] in the .json configuration.

By default nothing changes.
If an allow list is provided, the host must be on the list.

Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Previously the Go code would alias the two cases together, so we add
an explicit AllowEnabled boolean.

Also allow the user to customize the error message if desired.

Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
@djs55 djs55 force-pushed the http-proxy-allow-list branch from 5d66c2f to 01f194f Compare March 2, 2022 11:26
@djs55 djs55 changed the title WIP: HTTP: add an optional allow list to the proxy HTTP: add an optional allow list to the proxy Mar 2, 2022
@djs55 djs55 merged commit 551ba27 into moby:master Mar 2, 2022
@djs55 djs55 deleted the http-proxy-allow-list branch March 2, 2022 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant