Answer the question
In order to leave comments, you need to log in
How to allow requests from only one domain in nginx?
Good time of the day.
Such a question, more about protecting the API in general, probably.
The server itself: Nginx -> pm2 -> NodeJS.
The API will only receive POST and GET requests from a few specific domains. IP cannot be guaranteed that they will always have the same ones. How can the API be protected in this case? Enable CORS only for these domains? Or is there something else that needs to be done?
Answer the question
In order to leave comments, you need to log in
No way. Any set of headers can be faked without even going to the site) HTTP protocol is open and controlled with two fingers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question