Skip to content

Commit e25de9f

Browse files
committed
check origins
1 parent c467d3f commit e25de9f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ events {
22
worker_connections 1024;
33
}
44

5+
map $http_origin $allow_origin {
6+
~^https://(.*\.)?geode-solutions\.com$ $http_origin;
7+
default "";
8+
}
9+
510
http {
611
# Nginx will handle gzip compression of responses from the app server
712
gzip on;
@@ -14,6 +19,10 @@ http {
1419
server_name localhost;
1520

1621
client_max_body_size 0;
22+
23+
add_header Access-Control-Allow-Origin $allow_origin;
24+
add_header Access-Control-Allow-Credentials true;
25+
add_header Vary Origin;
1726

1827
location ~ "^/geode/" {
1928
if ($request_method !~ ^(DELETE|GET|POST|PUT|OPTIONS)$) {

0 commit comments

Comments
 (0)