![]() |
How to check if domain is in the 'allowed list'?
I'm sorry if I'm not clear enough, but I believe I've seen sites which uses JavaScript where it checks if the domain is in the 'allowed list' so that it sents out information to that site? Am I in the right forum or does it use .htaccess? D:
Sorry! |
Even if JavaScript could do that, it would be useless if a violator simply turned off JavaScript in his/her browser.
And, really, any domain that is hacking your site and/or doing a Denial Of Service attack is not going to be using a browser, anyway. No, you don't want to even think about JS for this. |
sounds like you're talking about CORS. you can list domains that ajax is allowed to fetch using the "Access-Control-Allow-Origin" header.
there's also the document.domain property which tells you your current domain. If you had a list of domains, you would use document.domain to spot that domain in a lineup. |
| All times are GMT +1. The time now is 04:28 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.