bootstrap.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. server:
  2. port: 21998
  3. spring:
  4. profiles:
  5. # dev 默认为开发环境 , prod 线上环境
  6. active: prod
  7. application:
  8. name: carbon-gateway
  9. cloud:
  10. nacos:
  11. discovery:
  12. server-addr: 127.0.0.1:8892
  13. config:
  14. server-addr: 127.0.0.1:8892
  15. prefix: carbon-gateway
  16. file-extension: yml
  17. # 公共配置文件
  18. shared-dataids: carbon-common.yml
  19. gateway:
  20. discovery:
  21. locator:
  22. # 是否与服务发现组件进行结合,通过 serviceId 转发到具体的服务实例。默认为false
  23. enabled: true
  24. lower-case-service-id: true #使用小写service-id
  25. # 处理响应头重复
  26. globalcors:
  27. corsConfigurations:
  28. '[/**]':
  29. #这里有个allowCredentials: true这个东西是设置允许访问携带cookie的,这点一定要和前端对应!
  30. allowCredentials: true
  31. #可以填写多个域名用","隔开 例如 "*"代表允许所有
  32. allowedOrigins: "*"
  33. allowedMethods: "*"
  34. allowedHeaders: "*"
  35. allow-credentials: true