mirror of https://github.com/yandex/gixy
#65: Fixed origin regex in documentation
parent
7360ee0adb
commit
e947fd16b4
|
@ -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';
|
||||||
}
|
}
|
||||||
|
|
|
@ -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';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue