From 9edaa407f2444ab3bcadd1c53a8e4864bb6e97e1 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:44:45 +0000 Subject: [PATCH] updated nginx conf examples for graphite CORS configuration --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 70f23a624ed..72062b0c1fe 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,8 @@ Header set Access-Control-Allow-Credentials true ``` And in nginx: ``` +auth_basic "Restricted"; +auth_basic_user_file /path/to/my/htpasswd/file; if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. }