question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue passing Authorization header in old Safari?

See original GitHub issue

Hi, I’m using the Authorization header with EventSource polyfill. Everything works great with Chrome, Firefox and recent Safari, but with Safari 9 the header is not sent to the server (it’s missing from the browser request). I see that only since Safari 10.1 the Fetch API is supported. Could this be the reason? And eventually is there anything I can do to fix/workaround the issue?

If it matters, I create the instance this way:

new EventSourcePolyfill(this.url, {
    withCredentials: this.withCredentials,
    lastEventIdQueryParameterName: 'last-id',
    headers: { Authorization: 'Token the_token' },
});

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paolodinacommented, Jun 14, 2021

@Yaffle Nope, it’s client side. I still don’t know where exactly the mistake is, but a friend told me that before the last client refactoring (which was big) it stopped working.

1reaction
paolodinacommented, Jun 14, 2021

It turned out it was an error in my code! Sorry for bothering, thanks for the polyfill.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Safari not clearing the Authorization header after HTTP ...
The same code running in Safari shows that the Authorization header was passed correctly in the request, but a debug output of the...
Read more >
Safari, Authorization header hangs… | Apple Developer Forums
Safari, Authorization header hangs the request to the server​​ XHR requests with Authorization header over HTTPS (both together) don't reach the server, using...
Read more >
Safari Authorization header - Laracasts
I am using the basic api authentication which is working in chrome and locally in safari. On the live server safari is returning...
Read more >
How to send Basic Authentication headers in Selenium?
I've tested using format http://user:pass@host and it works. So in Python (in setUp() of MyClass(unittest.TestCase) class) this should look like:
Read more >
HTTP authentication - MDN Web Docs - Mozilla
Usually a client will present a password prompt to the user and will then issue the request including the correct Authorization header.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found