springcloud gateway出现 413Request Entity Too Large
springcloud gateway出现 413Request Entity Too Largespringboot项目在yml中添加server:max-http-header-size: 2MBspringcloud项目在gateway里添加@Componentpublic class NettyConfiguration implements WebServerFactoryCustomi
·
springcloud gateway出现 413Request Entity Too Large
springboot项目在yml中添加
server:
max-http-header-size: 2MB
springcloud项目在gateway里添加
@Component
public class NettyConfiguration implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
@Override
public void customize(NettyReactiveWebServerFactory container) {
container.addServerCustomizers(
httpServer -> httpServer.httpRequestDecoder(
httpRequestDecoderSpec -> httpRequestDecoderSpec.maxHeaderSize(1000485760)
)
);
}
}
更多推荐
已为社区贡献1条内容
所有评论(0)