T
T
TechNOIR2020-09-28 13:08:48
Nginx
TechNOIR, 2020-09-28 13:08:48

nginx. How to make exceptions for basic auth?

Hello.

There is a page, it lies at https://site.com/download/test/
I put auth_basic there.
But since the page requests resources from the same folder: https://site.com/download/test/test.zip , https://site.com/download/test/test2.zip , etc., authorization is requested several times. How can I make it request only at the level https://site.com/download/test/index.html ? And if it is passed, then further resources from this folder no longer requested authorization.

thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2020-09-28
@ky0

Add a location to the web server config that processes all requests with the appropriate prefix, that is, in your case, /download/test, and move basic auth inside it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question