refactor(api): update session retrieval route

ensure we also check for the titlecased version of `authorization` header
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-12-08 23:27:47 -05:00
parent 26dfbda2c7
commit 53409d12da
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -1,5 +1,5 @@
export default eventHandler((event) => {
let ahead = (getHeaders(event).authorization || "")?.replace("Bearer ", "");
let ahead = (getHeaders(event).authorization || getHeaders(event).Authorization || "")?.replace("Bearer ", "");
if (event.context.currentUser && ahead) {
return {
token: ahead,