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.

x-socket-id header default causing issues.

See original GitHub issue

Why is the X-Socket-Id set per default?

This causes a shitload of problems with most API’s and it would be more beneficial to add it whenever you need to call a socket endpoint, rather than to remove it when it causes problems.

The Github API for example does not allow it in their preflight response. For Axios I have to do this all over the place now:

axios.get('user/repos', {
    transformRequest: [function (data, headers) {
        delete headers['X-Socket-Id'];
        return data;
    }]
})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ImJustToNycommented, Dec 19, 2017

Temporary workaround is to just unset this header like this:

$.ajaxSetup({
  beforeSend: function() {}
})

After creating new Echo’s instance.

2reactions
sir-guevaracommented, Jan 31, 2019

i have same issue using axios

Read more comments on GitHub >

github_iconTop Results From Across the Web

socket.io-client how to set request header when making ...
Headers are only provided when the connection is over http(s) which is always true for the initial handshake. After that, if the client/server...
Read more >
Troubleshooting connection issues | Socket.IO
You are trying to reach a plain WebSocket server; The server is not reachable; The client is not compatible with the version of...
Read more >
TCP/IP port exhaustion troubleshooting - Windows Client
Learn how to troubleshoot port exhaustion issues. Port exhaustion occurs when all the ports on a machine are used.
Read more >
Java Secure Socket Extension (JSSE) Reference Guide
Get the default factory by calling the SSLSocketFactory. ... If you have trouble using or configuring the JSSE application to use Kerberos, ...
Read more >
socket
Specifying a protocol of 0 causes socket() to use an unspecified default ... can be used for the domain argument are defined in...
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