I need to have password protected website without password, i have a dream then the website will check "does your computer containt file acess.txt,if this file contains 123456,website do ok you have an acess and redirects you to index.html
I hosting my website in Node.js
And i also running on Linux Debian
Apologie for my English, im Czech and young.
and yes im a programmer.
2
Answers
You can’t do that without having the user manually pick that file from an
input type="file"
or drag-and-drop it into your web page. For security reasons, web pages cannot check for files they provide the path of.That would mean your site is completely insecure anyway — anyone could just go directly to
index.html
.All access checks must happen on the server, not the client (browser).
Simple!
Replace:
With:
However you can not have JavaScript go snooping through a person’s file system. They must choose to browser and select a file to upload and then submit the form.