mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
updated nginx conf examples for graphite CORS configuration
This commit is contained in:
parent
c37496f2b0
commit
be03f6adb6
@ -99,8 +99,8 @@ if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if req
|
|||||||
set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one.
|
set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one.
|
||||||
}
|
}
|
||||||
if ($cors = 'true') {
|
if ($cors = 'true') {
|
||||||
add_header Access-Control-Allow-Origin $http_origin;
|
add_header Access-Control-Allow-Origin $http_origin; #this mirrors back whatever domain the request came from as authorized, as
|
||||||
add_header "Access-Control-Allow-Credentials" "true";
|
add_header "Access-Control-Allow-Credentials" "true"; #as long as it matches one of your if statements
|
||||||
add_header "Access-Control-Allow-Methods" "GET, OPTIONS";
|
add_header "Access-Control-Allow-Methods" "GET, OPTIONS";
|
||||||
add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";
|
add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user