Closed yogthos closed 11 years ago
Why does this need to be a macro?
on a second thought I think you're right, there isn't any reason for it to be a macro. It could just be a function which appends the context. Also, the distinction might not be useful in most cases, so it might be better for redirect to check the context, and if somebody does need to access the root container url they could specify it explicitly with an absolute url.
This is no longer relevant (since we're merging lib-luminus).
When a Noir application is deployed on an application server, such as Tomcat, and given a context root then it is ignored by the redirect function.
Since a user might legitimately want to redirect to a different context, redirect can't infer the context implicitly. I added a new helper called local-redirect, which will prepend the servlet context when it's available in the ring-request.
This allows local redirects to work correctly for both standalone and application server deployments.