Y
Y
Yakov Kravtsov2019-12-03 02:10:44
Nginx
Yakov Kravtsov, 2019-12-03 02:10:44

How to block url with repeated slashes at the beginning in nginx?

Good afternoon!
The question is probably simple, but I can't find the answer. Help me please!
How to block requests of the form in nginx:
//
//index.php
///index.php
///something there
I don’t understand how this goes, apparently some kind of bot. It's impossible to repeat this in browsers...
There is DOS from Asia to a server from the Netherlands. Nothing serious, but interferes with work ...
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-12-03
@virus_forever

server {
    if ($request_uri ~ "^//") {
        return 444;
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question