testlara's avatar

secure rest API

how to secure rest api ...after indias PM's app hacked its a question how to secure app ??please see this twit ... https://twitter.com/fs0c131y/status/978417736819736577 ?

0 likes
2 replies
bobbybouwmann's avatar

The most safest way is not publishing it on the internet at all!

Aside from the jokes, the best solution for you is using allowed origin headers. So your API validates from which sites the calls come. Take a look at this package: https://github.com/barryvdh/laravel-cors

2 likes

Please or to participate in this conversation.