You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the list in headers.lua is finite and cannot accommodate all possible header values. For instance, it does not include the commonly used header "Origin." I understand that keeping this list updated is challenging, especially given the existence of headers like "X-*-*."
Currently, the options are either to ignore this limitation (as most services handle lower-cased headers well) or to manage the headers manually.
My suggestion is to avoid storing headers altogether and instead normalize them on-the-fly. The existing socket.headers table could remain in place and serve as a cache.
The text was updated successfully, but these errors were encountered:
You can add a metatable with an __index method, it would get called if a header doesn't exist in the table. In that case, normalize it once, and update the table.
The issue is that the list in headers.lua is finite and cannot accommodate all possible header values. For instance, it does not include the commonly used header "Origin." I understand that keeping this list updated is challenging, especially given the existence of headers like "X-*-*."
Currently, the options are either to ignore this limitation (as most services handle lower-cased headers well) or to manage the headers manually.
My suggestion is to avoid storing headers altogether and instead normalize them on-the-fly. The existing
socket.headers
table could remain in place and serve as a cache.The text was updated successfully, but these errors were encountered: