java - Spring-bootDocker make actuator accessible at the root before the context - Stack Overflow

I've been struggling for a while to find a solution to the following problem:I have a SpringBoot

I've been struggling for a while to find a solution to the following problem:

I have a SpringBoot web application running in a Docker container.

The context is not at the root, it is of type:

server.servlet.context-path = /context-path/

Only, I am asked that actuator be accessible at the root therefore:

server-address/actuator/** should work.

And the web app must continue to run on its context:

server-address/context-path/**

For security and network reasons in production I am obliged to keep the "context-path". I can't just put the application path at the root.

I'm considering redirecting requests like server-address/actuator/** to server-address/context-path/actuator/**

I can't find a way to do this in the application because everything is behind the context path. Is it possible to do this upstream in the Docker container?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745569378a4633589.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信