Commit 6b19ce7d authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 82a9e8f3
......@@ -13,6 +13,7 @@ import org.springframework.web.util.UriBuilder;
import org.springframework.web.util.UriUtils;
import reactor.core.publisher.Mono;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Map;
......@@ -55,7 +56,7 @@ public class ProxyController {
log.info("proxyPost targetUrl: {}", targetUrl);
if ("post".equalsIgnoreCase(method)) {
return webClient.post()
.uri(uriBuilder -> {
/* .uri(uriBuilder -> {
uriBuilder.scheme("http");
uriBuilder.path(targetUrl);
......@@ -64,7 +65,8 @@ public class ProxyController {
);
log.info("proxyPost uriBuilder: {}", uriBuilder.build());
return uriBuilder.build();
})
})*/
.uri(URI.create(targetUrl))
.headers(httpHeaders -> headers.forEach(httpHeaders::set))
.bodyValue(body != null ? body : "") // 透传 Body
.retrieve()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment