mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-29 21:11:57 +08:00
[feat] 修复自定义请求头导致跨域的问题
This commit is contained in:
@@ -2,11 +2,8 @@ package com.ruoyi.gateway.config
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.cloud.gateway.filter.NettyWriteResponseFilter
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.core.Ordered
|
||||
import org.springframework.core.annotation.Order
|
||||
import org.springframework.http.HttpMethod
|
||||
import org.springframework.http.HttpStatus
|
||||
import org.springframework.web.server.WebFilter
|
||||
@@ -18,7 +15,6 @@ open class CorsConfig {
|
||||
private val corsOrgins: String? = null
|
||||
|
||||
@Bean
|
||||
@Order(NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER + 1)
|
||||
open fun corsFilter(): WebFilter {
|
||||
return WebFilter { exchange, chain ->
|
||||
val response = exchange.response
|
||||
|
||||
Reference in New Issue
Block a user