-1
In my backend I have this:
app.use('/files', express.static('upload'))
Generating static image and pdf links for users to access. In my frontend I put a button where the user can display the static link file.
But when opening the tab with the link always gives unauthorized, This is due to authentication middleware. How can I set the headers with the authentication data if who makes the request and the browser itself and not my application?
NOTE: One solution is that I do not authenticate the static file path, but security is compromised.