Search code examples
javaregexspringbackbone.jsspring-security

Spring Security with # in URL Pattern


I'm trying to get an app url pattern to match in security-http.xml and am running into some problems with the # symbol.

Here's a sample url: http://localhost:8080/test/#test2/foo

Here's the security-http that I am trying to use to match it

<sec:intercept-url pattern="^test/#test2/.*$" access="permitAll"/>

However, the "#" in the pattern does not seem to be working.

Any thoughts on this?

Thanks!


Solution

  • Anything after (and including) the hash (#) in a URL does not get sent in the request to the server so your server will never see that information.