Referer
Goal
Prevent certain referrers
Enabled
Enable or disable this wire
Methods
The methods specifies which methods should be inspected
Options:
- 'post'
- 'put'
- 'patch'
- 'get'
- 'all' or '*'
The 'all' or '*' is a alias to inspect all methods
->methods(['post', 'put']) // only post and put method
->methods(['*']) // all methods
Attack score
This is this wire severity, the higher the number the more severe. All attackScores will be summarized and if it exceeds the PunishScore the block will be activated. Set this to a number that reflects the severity.
- A very high number will immediately block the user/ip
- A low number will only block if there are many requests
TIP
sqli and xss are very common attack vectors with high confidence detection. You should set those to a very high number
Filters
Specify the list of referers that should be forbidden
Filters
This specifies what to allow and what to block
->filters(AllowBlockFilterConfig::make()->allow(['allow-this'])->block(['block-this']));
Example: Exception
allow must be at least ['*'] to allow all
->allow([])->block([])
Example: Allowed
firefox
is allowed
->allow(['firefox'])->block([])
Example: Blocked
brave
is blocked
->allow(['*'])->block(['brave'])
Example: Not Blocked
firebrave
is not blocked, so allowed
->allow(['*'])->block([])
Example: Not Blocked
Chrome
is not blocked, so allowed
->allow(['*'])->block(['brave'])
Example: Allowed and Blocked
firebrave
is both allowed and blocked, so allowed
->allow(['firebrave'])->block(['firebrave'])
Example: Unspecified
firebrave
is both not as allowed and not as blocked The return depends on where it is used.
->allow(['firebrave'])->block(['firebrave'])
Example
WireDetailsConfig::make()
->enabled(true)
->methods(['*'])
->attackScore(1000)
->filters([
'allow' => [],
'block' => []
]);
//... optional overrides