zppkq / CommentSystem

0 stars 0 forks source link

[Vssue]121 #71

Open zppkq opened 2 years ago

zppkq commented 2 years ago

https://www.zpsg.ltd/dist/

zppkq commented 2 years ago

发表评论

zppkq commented 2 years ago

spring: cloud: gateway:

。。。

  globalcors: # 全局的跨域处理
    add-to-simple-url-handler-mapping: true # 解决options请求被拦截问题
    corsConfigurations:
      '[/**]':
        allowedOrigins: # 允许哪些网站的跨域请求 
          - "http://localhost:8090"
        allowedMethods: # 允许的跨域ajax的请求方式
          - "GET"
          - "POST"
          - "DELETE"
          - "PUT"
          - "OPTIONS"
        allowedHeaders: "*" # 允许在请求中携带的头信息
        allowCredentials: true # 是否允许携带cookie
        maxAge: 360000 # 这次跨域检测的有效期

著作权归作者所有。 商业转载请联系作者获得授权,非商业转载请注明出处。 作者: 周佩 原文地址:https://b.zpsg.ltd/#/new/blogDetails/121

zppkq commented 2 years ago

@zppkq

发表评论

支持回复评论

zppkq commented 2 years ago

发布.png