Skip to content

fix: use sha1 hash for config files name when using regex host #2533

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

Merged
merged 4 commits into from
Nov 2, 2024
Merged

Conversation

buchdag
Copy link
Member

@buchdag buchdag commented Nov 1, 2024

Fixes #2529

As discussed in the issue, using VIRTUAL_HOST as basis for the file names nginx-proxy expects when VIRTUAL_HOST is a regex has the potential to render illegal characters in the nginx configuration.

This PR make sure that when VIRTUAL_HOST is a regex, nginx-proxy expect files whose name are based on the sha1 hash of the regex instead.

This might break previously working configuration, but I don't think there is another way around this, rendering regex characters in the config anywhere else than comments and the few directives that support them was a design error.

@buchdag buchdag self-assigned this Nov 1, 2024
@buchdag buchdag force-pushed the 2529 branch 3 times, most recently from b1ba7fd to 5affce1 Compare November 1, 2024 20:34
@buchdag buchdag changed the title fix: use sha1 hash for config files when using regex host fix: use sha1 hash for config files name when using regex host Nov 1, 2024
@buchdag buchdag marked this pull request as ready for review November 1, 2024 21:06
@buchdag buchdag merged commit a3db62b into main Nov 2, 2024
4 checks passed
@buchdag buchdag deleted the 2529 branch November 2, 2024 13:11
@buchdag buchdag added the type/fix PR for a bug fix label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix PR for a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regex base auth
1 participant