lushuncheng 5 år sedan
förälder
incheckning
6e720bd0bf
1 ändrade filer med 6 tillägg och 6 borttagningar
  1. 6 6
      config/nginx/template/proxy.nginx.conf

+ 6 - 6
config/nginx/template/proxy.nginx.conf

@@ -40,7 +40,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-festival|test-kaifain|test-job)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {
@@ -116,7 +116,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-festival|test-kaifain|test-job)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {
@@ -188,7 +188,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-festival|test-kaifain|test-job)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {
@@ -260,7 +260,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-kaifain|test-festival|test-job)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {
@@ -332,7 +332,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-kaifain|test-festival|test-job)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {
@@ -404,7 +404,7 @@ server {
         proxy_http_version 1.1;
 
         #=========================CORS nginx配置=============================
-        if ($http_origin ~* (https?://([0-9a-z\-_]+)\.(test|test-rooter|test-jishuin|test-festival)\.proginn\.com(:[0-9]+)?)$) {
+        if ($http_origin ~* (https?://([^\.]+\.)*proginn\.com(:[0-9]+)?)$) {
             set $cors "true";
         }
         if ($request_method = 'OPTIONS') {