You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Angular applications use a base-tag inside the head-tag. The base tag has an href attribute which is the intended context path of the application. This value is not rewritten causing the application not to work.
Is there a way to add another processor to ocpsoft-rewrite that it would also rewrite this attribute?
Rewrite can only rewrite URLs, if they are passed though HttpServletResponse.encodeURL(). Typically all URLs rendered to the page are encoded this way to preserve JSESSIONID if used. So if you simple put a string literal into your page, it won't be rewritten.
You could either encode the URL using HttpServletResponse.encodeURL() yourself, or you could the Transformer API to modify the HTML by doing some kind of search + replace.
Angular applications use a base-tag inside the head-tag. The base tag has an href attribute which is the intended context path of the application. This value is not rewritten causing the application not to work.
Is there a way to add another processor to ocpsoft-rewrite that it would also rewrite this attribute?
Angular documentation of base-Tag: https://angular.io/guide/router
The text was updated successfully, but these errors were encountered: