Could you please give me hint or sample code for restricting access to website to only specific IP addresses using no more or less than JS / jQuery?
I found a lot of examples for other methods like htaccess or so, but not for JS
Could you please give me hint or sample code for restricting access to website to only specific IP addresses using no more or less than JS / jQuery?
I found a lot of examples for other methods like htaccess or so, but not for JS
You can't achieve this with client side code. If you want to use JavaScript then you have to use server side JavaScript (e.g. via Node.js, Classic ASP w/JScript, etc).
The specifics of how you get the IP address will depend on the server side framework you use. Typically you would be able to retrieve it by accessing a method or property of whatever object represents.
(If you aren't using server side JS already, you probably should look towards a more mainstream solution such as the ones you've already found).
JS is clientside - you cannot restrict them from seeing the page... using the page.
What kind of backend are you running? It is trivial through an endpoint.