Javascript – Want to restrict the PDF file hosted on Express server
I am serving a PDF file on node server at this path - /content/assets/sample.pdf. I want to restrict unauthorize access to this PDF file. For that, I have applied the authentication to /content/assets/* router.use('/content/assets/*', isAuthenticated, (req, res) => { const…