When the soul gateway makes proxy calls to the target service, it also allows users to use the redirect
plugin to redirect requests.
soul-admin
--> plugin management --> redirect
,set to enable。redirect
support in the pox.xml file of the gateway.Add the plugin dependency in the pom.xml file of the soul-bootstrap project.
<!-- soul redirect plugin start--> <dependency> <groupId>org.dromara</groupId> <artifactId>soul-spring-boot-starter-plugin-redirect</artifactId> <version>${last.version}</version> </dependency> <!-- soul redirect plugin end-->
As the name suggests, the
redirect
plugin is to re-forward and redirecturi
.
Rule
, it should be a reachable service path.Soul Gateway
will perform the 308
service jump according to the customized path.DispatcherHandler
internal interface for forwarding./
as the prefix in the configuration path. The specific configuration is as shown in the figure below.