Welcome! Log In Create A New Profile

Advanced

nginx configuration variable interpolation

Vilius Šumskas
March 27, 2023 11:26AM
Hello,

I have the following directive in Nginx configuration:

location /docs {
add_header Access-Control-Allow-Origin $cors_origin;
}

$cors_origin comes from the map {} where the value is set to * or something else.

I have noticed that if $cors_origin is set to 0, add_header doesn’t add Access-Control-Allow-Origin header at all. Is this expected? I don’t see anything about such behaviour in the add_header documentation.

--
Best Regards,

Vilius

_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx configuration variable interpolation

Vilius Šumskas March 27, 2023 11:26AM

Re: nginx configuration variable interpolation

Maxim Dounin March 27, 2023 12:10PM

RE: nginx configuration variable interpolation

Vilius Šumskas March 28, 2023 01:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready