You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.6 KiB
63 lines
1.6 KiB
server:
|
|
port: 17000
|
|
|
|
spring:
|
|
application:
|
|
name: zdxt-gateway
|
|
cloud:
|
|
gateway:
|
|
# 全局CORS配置
|
|
globalcors:
|
|
cors-configurations:
|
|
'[/**]':
|
|
allowedOriginPatterns: "*"
|
|
allowedMethods:
|
|
- GET
|
|
- POST
|
|
- PUT
|
|
- DELETE
|
|
- OPTIONS
|
|
allowedHeaders: "*"
|
|
allowCredentials: true
|
|
maxAge: 3600
|
|
# 路由配置
|
|
routes:
|
|
- id: enterprise-service
|
|
uri: http://localhost:18000
|
|
predicates:
|
|
- Path=/ent-ep/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin, RETAIN_UNIQUE
|
|
- id: supervision-service
|
|
uri: http://localhost:18001
|
|
predicates:
|
|
- Path=/sup-ep/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin, RETAIN_UNIQUE
|
|
- id: enforcement-service
|
|
uri: http://localhost:18002
|
|
predicates:
|
|
- Path=/enf-ep/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin, RETAIN_UNIQUE
|
|
|
|
# Actuator监控端点配置
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: '*'
|
|
endpoint:
|
|
health:
|
|
show-details: ALWAYS
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
root: info
|
|
org.springframework.cloud.gateway: info
|
|
com.zdxt.gateway: info
|
|
com.zdxt.gateway.webserver.filter: info
|
|
|