Request headers in config are not sent for tiled images
See original GitHub issueI noticed that when setting an authorization header via the requestHeaders
config that the header does not get sent for tiled images.
https://photo-sphere-viewer.js.org/guide/config.html#requestheaders
I am dynamically setting the request header with a token using a function like this:
function changeRequestToken(token: string) {
viewer.config.requestHeaders = (url) => {
console.debug(`requesting asset ${url} with token ${token}`);
return { Authorization: `Bearer ${token}` };
};
}
If I use the standard equirectangular adapter, the header is sent as expected:
If I switch to the equirectangular tiled adapter, the header gets sent for the low resolution preview image:
But the header fails to be sent for the image tiles:
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Passing authorization header for images src to remote server ...
The idea is that, when you use <img src="http://foo.com/image/1"> there is no way to pass the authorization headers.
Read more >axios doesn't see request headers that I set #891 - GitHub
The request is sent successfully so I don't write the code where I call axios. The problem is I couldn't set the headers....
Read more >HTTP Error 431: 3 Ways to Fix Request Header Fields Too ...
The HTTP Error 431: Request Header Fields Too Large response status code indicates that the origin server refuses to fulfill users' requests.
Read more >HTTP security headers: An easy way to harden your web ...
Modern browsers support a wide array of HTTP headers that can improve web application security to protect against clickjacking, ...
Read more >Request headers and responses - App Engine - Google Cloud
An incoming HTTP request includes the HTTP headers sent by the client. For security purposes, some headers are sanitized, amended, or removed by ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let’s got a runtime warning
This feature/bug fix has been released in version 4.8.0.