Expand my Community achievements bar.

SOLVED

Dispatcher Filter Rules /glob vs /url

Avatar

Level 1

Hello Team,

This is related best practice for setting the dispatcher filters ,

Suppose we have following two rules,

0001 { /type "allow" /glob "/bin/*"    }  
0002 { /type "allow" /url "/bin/*"    }

What are the advantages and disadvantages of glob and url pattern in above case, which one is suggested ?

With both the rules is it possible to access URLs like , http://domain/bin/../libs/xyz/someresource or some other important resource in repo.

1 Accepted Solution

Avatar

Correct answer by
Level 10

As Configuring Dispatcher says, glob property is used to match with the entire request-line while url will just match with url element. Clearly, glob is more powerful that url.

Why would you want to abuse glob with just an element of the request? Per my knowledge, the recommended property is url in this case.

  • Element of the Request Line: Include /method, /url, /query, or /protocol and a pattern for filtering requests according to these specific parts of the request-line part of the HTTP request. Filtering on elements of the request line (rather than on the entire request line) is the preferred filter method.
  • glob Property: The /glob property is used to match with the entire request-line of the HTTP request.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

As Configuring Dispatcher says, glob property is used to match with the entire request-line while url will just match with url element. Clearly, glob is more powerful that url.

Why would you want to abuse glob with just an element of the request? Per my knowledge, the recommended property is url in this case.

  • Element of the Request Line: Include /method, /url, /query, or /protocol and a pattern for filtering requests according to these specific parts of the request-line part of the HTTP request. Filtering on elements of the request line (rather than on the entire request line) is the preferred filter method.
  • glob Property: The /glob property is used to match with the entire request-line of the HTTP request.