Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 321 Bytes
278d122 |
1 2 3 4 5 6 7 8 9 10 |
import { IncomingHttpHeaders } from "node:http"
export const hasValidAuthorization = (headers: IncomingHttpHeaders) => {
const [_, token] = `${headers.authorization || ""}`.split(" ")
if (typeof token === "string" && token.trim() === process.env.VC_SECRET_ACCESS_TOKEN.trim()) {
return true
}
return false
} |