I set to my project json web token authentication. I secured all requests under "private" path. What is the best way to download an image from client using tag img and attribute src.
<img src="/private/test.jpg" />
The only solution I have so far is to set a coookie on the client with token value and instead of private to access public path. Than on the server I will get the cookie value and make a new request with proper token set in the header toward my private path.
Is there more elegant way ?