1234567891011121314151617181920212223242526272829303132333435 |
- server:
- port: 21998
- spring:
- profiles:
- # dev 默认为开发环境 , prod 线上环境
- active: prod
- application:
- name: carbon-gateway
- cloud:
- nacos:
- discovery:
- server-addr: 127.0.0.1:8892
- config:
- server-addr: 127.0.0.1:8892
- prefix: carbon-gateway
- file-extension: yml
- # 公共配置文件
- shared-dataids: carbon-common.yml
- gateway:
- discovery:
- locator:
- # 是否与服务发现组件进行结合,通过 serviceId 转发到具体的服务实例。默认为false
- enabled: true
- lower-case-service-id: true #使用小写service-id
- # 处理响应头重复
- globalcors:
- corsConfigurations:
- '[/**]':
- #这里有个allowCredentials: true这个东西是设置允许访问携带cookie的,这点一定要和前端对应!
- allowCredentials: true
- #可以填写多个域名用","隔开 例如 "*"代表允许所有
- allowedOrigins: "*"
- allowedMethods: "*"
- allowedHeaders: "*"
- allow-credentials: true
|