最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin2浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论