#65: Fixed origin regex in documentation

pull/66/head
Andrew Krasichkov 2017-07-06 19:24:24 +03:00
parent 7360ee0adb
commit e947fd16b4
4 changed files with 2 additions and 2 deletions

View File

View File

@ -17,7 +17,7 @@ The most common errors with this configuration are:
Misconfiguration example: Misconfiguration example:
```nginx ```nginx
if ($http_origin ~* ((^https://www\.yandex\.ru)|(^https://ya\.ru)/)) { if ($http_origin ~* ((^https://www\.yandex\.ru)|(^https://ya\.ru)$)) {
add_header 'Access-Control-Allow-Origin' "$http_origin"; add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Credentials' 'true';
} }

View File

View File

@ -17,7 +17,7 @@
Пример плохой конфигурации: Пример плохой конфигурации:
```nginx ```nginx
if ($http_origin ~* ((^https://www\.yandex\.ru)|(^https://ya\.ru)/)) { if ($http_origin ~* ((^https://www\.yandex\.ru)|(^https://ya\.ru)$)) {
add_header 'Access-Control-Allow-Origin' "$http_origin"; add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Credentials' 'true';
} }