Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to block HTTP requests made by Postman in .NET Core?

I just wanted to know whether is there any way block to HTTP requests made by POSTMAN? Just like browser with the help of CORS allows only specific origins to access a resource. Thanks in advance.

like image 311
abcbc Avatar asked Dec 31 '22 15:12

abcbc


1 Answers

No.

In CORS, it's browser job to block request (or answer), your server does not know "truth" about request. If some power user will disable "following CORS rules" in browser settings/flags - your CORS settings will be ignored.

And even if you will find some "special headers" that POSTMAN will "understand" and refuse to work - there are many other "clients" that can send http(s) requests to server (curl, Fiddler, ...).

like image 152
Dmitry Avatar answered Jan 13 '23 18:01

Dmitry