Answer the question
In order to leave comments, you need to log in
How to write a regular expression with domain variation?
Good evening.
You need to specify allowed domains where only login https://*.domain.ru will change
add_header 'Access-Control-Allow-Origin' 'https://login.domain.ru';
if ($http_origin ~* "^https?://[^/]+\.domain\.ru$" ) {
add_header Access-Control-Allow-Origin $http_origin;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question