How to serve a download of a file which is protected via HTTP authentication
<p>On a server I have several files which are protected via HTTP authentication. </p>

<p>Now I want to create download buttons on my HTML page to download these files. I already read that downloading a file via JavaScript/AJAX isn't possible due to security reasons. See this <a href="https://stackoverflow.com/questions/4545311/download-a-file-by-jquery-ajax">question</a>.</p>

<p>Furthermore via an "normal" download link/button like this: <code>&lt;a href="..." download&gt;</code> it isn't possible to set the HTTP Header to provide HTTP authentication.  </p>

<p>Is there any possibility to make a download button/link to a file with HTTP Basic authentication.</p>

<p>Furthermore to give a little bit more detail about my usecase, I don't want to use sessions.  </p>