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

Problem with conditionals #77

Closed
kcholoren opened this issue Feb 9, 2023 · 2 comments
Closed

Problem with conditionals #77

kcholoren opened this issue Feb 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@kcholoren
Copy link
Contributor

Hi, I found a problem that I think is new, because this configuration was already working, but yesterday I edited a Site and a problem appeared.
My configuration has several ifs inside the location part.
For example:

location /XXXX/ {
        proxy_pass YYYY
       ....
        if ($allowed_country = no) {        return 444; }
    }

But when I re-edit the site, in the editor it becomes:

location /XXXX/ {
        proxy_pass YYYY
       ....
        if ($allowed_country = no);
        return 444;
    }

And I get an error when I try to save:

Nginx Configuration Parse Error
nginx: [emerg] directive "if" has no opening "{" in /etc/nginx/sites-enabled/tkl-default:83 nginx: configuration file /etc/nginx/nginx.conf test failed 

Any ideas why?
Thank you!

@0xJacky 0xJacky added the bug Something isn't working label Feb 9, 2023
0xJacky added a commit that referenced this issue Feb 9, 2023
@0xJacky
Copy link
Owner

0xJacky commented Feb 9, 2023

Thank you for your report. This problem should be fix in 6b9ebbf, and the fix will be released in next version.

@kcholoren
Copy link
Contributor Author

Thank you!

@0xJacky 0xJacky mentioned this issue Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants