{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9196","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9196/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9196/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9196/events","html_url":"https://github.com/grails/grails-core/issues/9196","id":102155916,"number":9196,"title":"URL Mappings overwriting URI and causing redirect issues in Interceptor After()","user":{"login":"orubel","id":274764,"avatar_url":"https://avatars.githubusercontent.com/u/274764?v=3","gravatar_id":"","url":"https://api.github.com/users/orubel","html_url":"https://github.com/orubel","followers_url":"https://api.github.com/users/orubel/followers","following_url":"https://api.github.com/users/orubel/following{/other_user}","gists_url":"https://api.github.com/users/orubel/gists{/gist_id}","starred_url":"https://api.github.com/users/orubel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orubel/subscriptions","organizations_url":"https://api.github.com/users/orubel/orgs","repos_url":"https://api.github.com/users/orubel/repos","events_url":"https://api.github.com/users/orubel/events{/privacy}","received_events_url":"https://api.github.com/users/orubel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-20T14:44:56Z","updated_at":"2015-08-20T15:25:16Z","closed_at":null,"body":"I needed to set a dynamic naming to my api (much like multitenancy) so I was pulling this in via config with @Value but setting dynamic properties outside the 'static mapping' and then trying to pull them in doesn't work. So I switched to using a wildcard in the front of the URI in url mappings like so:\r\n\r\n    static mappings = {\r\n        \"/*/$controller/$action?/$id?(.$format)?\"{\r\n            controller = controller\r\n            action = action\r\n            parseRequest = true\r\n        }\r\n    }\r\n\r\nNow this is perfectly fine as I can now filter these results in the Interceptor thus saving on filtering twice.\r\n\r\nHowever, in the after() method in the interceptor, any type of redirect/chain/forward, sees the URI as '\"/*/$controller/$action' when forwarding.\r\n\r\nSince we are doing a redirect, should current URI be being accepted and it that IS the current URI, can we replace in interceptor after filtering?\r\n\r\nURLMapping can have wildcards and this is acceptable from what I have read and how they function, so redirect/forwards and chain need to adapt for a SENT uri and not the urlmapping.\r\n\r\nAt least this is what it seems like it is doing?\r\n\r\nTest app is at https://github.com/orubel/testapp\r\n\r\nreferences: #9194 and #600"},"comment":{"url":"https://api.github.com/repos/grails/grails-core/issues/comments/133048684","html_url":"https://github.com/grails/grails-core/issues/9196#issuecomment-133048684","issue_url":"https://api.github.com/repos/grails/grails-core/issues/9196","id":133048684,"user":{"login":"orubel","id":274764,"avatar_url":"https://avatars.githubusercontent.com/u/274764?v=3","gravatar_id":"","url":"https://api.github.com/users/orubel","html_url":"https://github.com/orubel","followers_url":"https://api.github.com/users/orubel/followers","following_url":"https://api.github.com/users/orubel/following{/other_user}","gists_url":"https://api.github.com/users/orubel/gists{/gist_id}","starred_url":"https://api.github.com/users/orubel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orubel/subscriptions","organizations_url":"https://api.github.com/users/orubel/orgs","repos_url":"https://api.github.com/users/orubel/repos","events_url":"https://api.github.com/users/orubel/events{/privacy}","received_events_url":"https://api.github.com/users/orubel/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T15:25:16Z","updated_at":"2015-08-20T15:25:16Z","body":"As explained above:\r\n\r\n\"I needed to set a dynamic naming to my api (much like multitenancy) so I was pulling this in via config with @Value but setting dynamic properties outside the 'static mapping' and then trying to pull them in doesn't work.\"\r\n\r\nThats a dynamic variable going into a static setting.\r\n\r\n"}}