lundi 24 juin 2019

How can I use middleware so a user has to fill in a password before viewing a page/file?

For a website I'm building I need to password protect PDF files, for this I want to use middleware so everyone that wants to go to the route of the file will be redirected to a page where they'll have to fill in a password. When they fill in the correct password they will then be redirected to the file, if not they'll be redirected to their previous page.

I've been looking online for a way to do this, even been trying to find a way to encrypt the PDF files themselves, but couldn't find anything remotely close to what I am trying to achieve.

I hope somebody can help me with this issue, thank you in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire