Parcourir la source

修改README跨域设置

Jia_RG il y a 6 ans
Parent
commit
110e27c965
1 fichiers modifiés avec 7 ajouts et 5 suppressions
  1. 7 5
      hsweb-starter/hsweb-spring-boot-starter/README.md

+ 7 - 5
hsweb-starter/hsweb-spring-boot-starter/README.md

@@ -15,11 +15,13 @@ hsweb:
 hsweb: 
     cors:
       enable: true
-      allowed-headers: "*"
-      allowed-methods: "*"
-      allowed-origins: "*"
-      allow-credentials: true
-      max-age: 14400
+      configs:
+        - /**:
+            allowed-headers: "*"
+            allowed-methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
+            allowed-origins: ["http://xxx.example.com"]
+            allow-credentials: true
+            maxAge: 1800
 ```
 
 # json序列化配置