1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

调试快速登录

This commit is contained in:
2023-03-28 13:14:40 +08:00
parent 76ad164d4e
commit 614e04ed1b
9 changed files with 446 additions and 36 deletions

View File

@@ -56,6 +56,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.26</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -14,6 +14,25 @@ spring:
locator:
enabled: true
lower-case-service-id: true
globalcors:
add-to-simple-url-handler-mapping: true # 解决 options 请求被拦截问题
corsConfigurations:
'[/**]':
# allowedOrigins: # 允许哪些网站的跨域请求 allowedOrigins: “*” 允许所有网站
# - "https://localhost:8001"
# - "https://localhost:8002"
# - "https://localhost:8003"
allowedOriginPatterns:
- "*"
allowedMethods: # 允许的跨域ajax的请求方式 “*” 允许所有
- "GET"
- "POST"
- "DELETE"
- "PUT"
- "OPTIONS"
allowedHeaders: "*" # 允许在请求中携带的头信息
allowCredentials: true # 是否允许携带cookie
maxAge: 360000 # 这次跨域检测的有效期
routes:
- id: user
uri: lb://microservice-provider-user