C
C
criminalist2019-10-15 08:25:48
PHP
criminalist, 2019-10-15 08:25:48

Nginx close access to files if the transition is not from my domain?

Hello everyone, I'm looking for a solution on how to close direct access to downloading files from the site, if the user opens a direct link not from my site, but for example from someone else's domain, of course, the nginx solution is better, but I'll also consider PHP options.
ps is done to combat duplicate sites that post links to download files from my site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2019-10-15
@ky0

Since neither the referral nor the authorization suits you, give users a session cookie and allow downloads using it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question