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

nginx-regex-tester changed my configuration from regextester.conf #47

Open
zakabluk opened this issue Aug 31, 2021 · 2 comments
Open

nginx-regex-tester changed my configuration from regextester.conf #47

zakabluk opened this issue Aug 31, 2021 · 2 comments

Comments

@zakabluk
Copy link

I wrote to regextester.conf next settings

server {
    listen 9000;
    location / {
        return 200 "Match not found\n";
    }
    location ~ "^/([a-zA-Z]{2})/hq/" {
        return 200 "Match found  Capture Group 1: $1\n";
    }
}

after deploy I get nginx error and into docker container I see that my srttings was changed to

server {
    listen 9000;
    location / {
        return 200 "Match not found\n";
    }
    location ~* ^/([a-zA-Z]{2})/hq/ {
        return 200 "Match found  Capture Group 1: $1\n";
    }
}

OK, I returnet config into conteiner againe, then do nginx -s reload and again get wrong config with

 location ~* ^/([a-zA-Z]{2})/hq/

Why?

@zakabluk
Copy link
Author

zakabluk commented Aug 31, 2021

NOTE: config changed after press button "test" on the page.

@tienidurodad
Copy link
Contributor

Some regexs in nginx need to be quoted, and this is one because of the {}.

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

No branches or pull requests

2 participants