[feat] 修复自定义请求头导致跨域的问题

pull/445/head
hsdllcw 2024-09-10 11:36:38 +08:00
parent c8c7042269
commit f622222943
1 changed files with 0 additions and 4 deletions

View File

@ -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