mirror of
https://github.com/sst/opencode.git
synced 2025-07-24 16:23:43 +00:00
wip: github actions
This commit is contained in:
parent
c7f30e1065
commit
766bfd025c
1 changed files with 5 additions and 1 deletions
|
@ -230,7 +230,11 @@ export default {
|
|||
// get Authorization header
|
||||
const authHeader = request.headers.get("Authorization")
|
||||
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
|
||||
const JWKS = createRemoteJWKSet(new URL(JWKS_URL))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue