Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72358

Best way to protect a website from using an api (whitelisting the only one that can)?

$
0
0

I have simple website written with react and also a simple API written with express.js. One of my API endpoints is for my contact form (from react) that allows a visitor to send an email. A kind of Contact US form.

I want to ensure or make it as difficult as possible for anybody to contact the API. I can't white-list the IP because the API would be from the browser. I can use HTTP referrer but is there anything else ?

Any ideas the best way around this ?


Viewing all articles
Browse latest Browse all 72358

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>