I have noticed that URLs that can be set in htmx response headers e.g. HX-Redirect are not automatically interpreted as context relative. This is a bit annoying because you have to manually prepend the context path in your controller method. And that's why I've changed this behavior. Each URL starts with a slash ("/") is interpreted as context relative to the current ServletContext and therefore the context path will be prepended to the URL.
It is also possible to deactivate this behavior in the HtmxResponse.Builder and in all relevant annotations e.g @HxRedirect etc.
I have noticed that URLs that can be set in htmx response headers e.g.
HX-Redirect
are not automatically interpreted as context relative. This is a bit annoying because you have to manually prepend the context path in your controller method. And that's why I've changed this behavior. Each URL starts with a slash ("/") is interpreted as context relative to the current ServletContext and therefore the context path will be prepended to the URL.It is also possible to deactivate this behavior in the
HtmxResponse.Builder
and in all relevant annotations e.g@HxRedirect
etc.