zoukankan      html  css  js  c++  java
  • allowedOrigins cannot contain the special value "*" gateway 报错

    java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain 
    the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response 
    header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.
    	at org.springframework.web.cors.CorsConfiguration.validateAllowCredentials(CorsConfiguration.java:460)
    
    	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
    Error has been observed at the following site(s):
    	|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain][from www.fhadmin.cn]

    问题原因,新版本的gateway 取消了allowedOrigins, 对应的变更为 allowedOriginPatterns

    配置修改为:

    #--------gateway配置---fhadmin.cn-----
    #使用服务发现路由
    spring.cloud.gateway.discovery.locator.enabled=true
    #服务路由名小写
    spring.cloud.gateway.discovery.locator.lower-case-service-id=true
    #跨域配置(java www.fhadmin.org)
    spring.cloud.gateway.globalcors.corsConfigurations.[/**].allowedOriginPatterns=*
    spring.cloud.gateway.globalcors.corsConfigurations.[/**].allowedHeaders=*
    spring.cloud.gateway.globalcors.corsConfigurations.[/**].allowedMethods=*
    spring.cloud.gateway.globalcors.corsConfigurations.[/**].allowCredentials=true

    工作流模块------------------www.fhadmin.cn-------------

    1.模型管理 :web在线流程设计器、导入导出xml、复制流程、部署流程

    2.流程管理 :导入导出流程资源文件、查看流程图、根据流程实例反射出流程模型、激活挂起

    3.运行中流程:查看流程信息、当前任务节点、当前流程图、作废暂停流程、指派待办人、自由跳转

    4.历史的流程:查看流程信息、流程用时、流程状态、查看任务发起人信息

    5.待办任务 :查看本人个人任务以及本角色下的任务、办理、驳回、作废、指派一下代理人

    6.已办任务 :查看自己办理过的任务以及流程信息、流程图、流程状态(作废 驳回 正常完成)

    办理任务时候可以选择用户进行抄送,就是给被抄送人发送站内信通知当前审批意见以及备注信息

    注:当办理完当前任务时,下一任务待办人会即时通讯收到新任务消息提醒,当作废和完结任务时,

    任务发起人会收到站内信消息通知

     
  • 相关阅读:
    单独下载克隆clone github中master 分支的文件夹
    caffe makefile.config anaconda2 python3 所有问题一种解决方式
    问题解决
    找不到cannot find -lpython3.5m caffe anaconda python3 ubuntu16.04
    bash./ autogen 没有这个文件 ubuntu16.04git安装glog报错
    cumulative match score
    【Python网络编程】复习
    【Python网络编程】爬取百度贴吧、小说内容、豆瓣小说、Ajax爬微博、多线程爬淘宝
    【Python网络编程】UDP聊天、TCP文件下载、多线程UDP聊天器、多进程拷贝文件
    【前端性能】网站性能优化
  • 原文地址:https://www.cnblogs.com/teacher11/p/14993938.html
Copyright © 2011-2022 走看看