V
V
Vladislav Shkaev2016-04-17 16:08:50
Nginx
Vladislav Shkaev, 2016-04-17 16:08:50

How to close directory access except for XMLHttpRequest requests?

Access to the /core/ directory and all files inside the directory is closed. From the browser we submit to 403, everything is ok.

location ~* ^/core/ {
    deny	 all;
  }

access to files via XMLHttpRequest request is also closed (
Question: how to allow access to files in a package, for example /core/ajax/search.php only for XMLHttpRequest request
The task is to protect the entire core folder, and not specifically the /core/ajax/ folder, not willing remove ajax folder from core

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2016-04-17
@proxid

You won't protect yourself from anyone. An attacker can also send XHR.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question