Answer the question
In order to leave comments, you need to log in
How to check where a post request came from?
Hello.
I have an api that connects to an angular2 example api/controller.
I send a post request to it. How can I make sure that the data comes from where it is needed, what if someone connects there and throws all sorts of nasty things there or just lays down the base?
Thank you.
Answer the question
In order to leave comments, you need to log in
$_SERVER['REMOTE_ADDR'] is fine?
In general, angular has nothing to do with it. The issue must be resolved on the server. Limit the frequency of requests from one ip, authorization, access to certain sections according to authorization. Yes, and CSRF tokens in the forms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question