Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to provide their own Docker credentials #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gw0
Copy link

@gw0 gw0 commented Feb 18, 2021

This PR adds two configurable options that allow users to provide their own Docker credentials:

elif [[ "a${ALLOW_PUSH_WITH_OWN_AUTH}" == "atrue" ]]; then
cat << 'EOF' > /etc/nginx/conf.d/allowed.methods.conf
# Block POST/PUT/DELETE if own authentication is not provided.
set $combined_ha_rm "$http_authorization$request_method";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workaround is needed, because Nginx does not support multiple conditions and not even nested if-clauses (https://ezecodes.wordpress.com/2016/06/30/multiple-if-conditions-in-nginx/).

@Bastians-Bits
Copy link

Bastians-Bits commented Apr 20, 2023

I know this is probably not the right place, but thank you @gw0! Since we switched to OCI for our image repository I couldn't use the proxy anymore (couldn't get the auth to work), but with your fork it works like a charm :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants