Alex
Alex

Reputation: 67248

Possible to send custom header from the browser when loading images/videos?

When calling fetch("http://server.com/api) we can send custom headers, like "authorization".

But when including images, videos, or other things in the HTML, there is no control over the headers?

<img src="http://server.com/image.jpg" />

The only option is to pass them as query vars, like

<img src="http://server.com/image.jpg?authorization=xxx" />

?

Upvotes: 1

Views: 40

Answers (0)

Related Questions