J
J
jenya77712017-12-15 12:13:15
API
jenya7771, 2017-12-15 12:13:15

Do you need CSRF protection in the API?

Hello, I am making an API on nodeJs using the restify plugin, I use JWT for authorization. And I have a question: is it necessary to protect against such an attack in the API?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Gerasimov, 2017-12-15
@Omashu

No, the jwt issued token already fulfills this function

B
Boris Korobkov, 2017-12-15
@BorisKorobkov

No.
CSRF, as the name Cross Site Request Forgery implies, is only needed to check access from the site (from the browser) and protect against bots.
The API, as the name suggests, the Application Programming Interface, on the contrary, is designed for bots.

A
Alexey Guest007, 2018-01-09
@Guest007

In this case, CORS is used to control access sources.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question