mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 17:24:22 +01:00
wip: github actions
This commit is contained in:
@@ -230,7 +230,11 @@ export default {
|
|||||||
// get Authorization header
|
// get Authorization header
|
||||||
const authHeader = request.headers.get("Authorization")
|
const authHeader = request.headers.get("Authorization")
|
||||||
const token = authHeader?.replace(/^Bearer /, "")
|
const token = authHeader?.replace(/^Bearer /, "")
|
||||||
if (!token) return new Response("Error: authorization header is required", { status: 401 })
|
if (!token)
|
||||||
|
return new Response(JSON.stringify({ error: "Authorization header is required" }), {
|
||||||
|
status: 401,
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
})
|
||||||
|
|
||||||
// verify token
|
// verify token
|
||||||
const JWKS = createRemoteJWKSet(new URL(JWKS_URL))
|
const JWKS = createRemoteJWKSet(new URL(JWKS_URL))
|
||||||
|
|||||||
Reference in New Issue
Block a user