'How to restrict rest api client in Node Js Express

are there any code/third party libraries to stop api testing using rest api clients for Express/node api testing after production ? or how to restrict rest api client or limit it to particular number of tester .



Solution 1:[1]

In a nutshell, you can't. Any tool like postman or any script (such as node.js, PHP, Perl, etc...) can send whatever headers or other request parameters it wants so headers by themselves are useless for restricting access to only a web page in your domain.

That's just how the web works.

Check out this awesome explanation on SO

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jithin