Skip to content

Commit 4bb1584

Browse files
committed
dev: add demo cors whitelist
1 parent 6491828 commit 4bb1584

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

infra/minio/cors.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"CORSRules": [
33
{
44
"AllowedOrigins": [
5-
"http://localhost:3000"
5+
"http://localhost:3000",
6+
"http://localhost:3001",
7+
"https://ezclaim-admin.liuzisen.com",
8+
"https://ezclaim-web.liuzisen.com"
69
],
710
"AllowedMethods": [
811
"GET",

src/main/java/org/acssz/ezclaim/config/DevCorsConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public class DevCorsConfig {
1717
public CorsConfigurationSource corsConfigurationSource() {
1818
CorsConfiguration cfg = new CorsConfiguration();
1919
cfg.setAllowedOrigins(List.of("http://localhost:3000", "http://127.0.0.1:3000"));
20+
cfg.setAllowedOrigins(List.of("http://localhost:3001", "http://127.0.0.1:3001"));
21+
cfg.setAllowedOrigins(List.of("https://ezclaim-web.liuzisen.com", "https://ezclaim-admin.liuzisen.com"));
2022
cfg.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"));
2123
cfg.setAllowedHeaders(List.of("*"));
2224
cfg.setAllowCredentials(true);

0 commit comments

Comments
 (0)