Skip to content

Commit

Permalink
Use ctx.do to match CTX service
Browse files Browse the repository at this point in the history
/AP1 is not a vaild vin context
  • Loading branch information
sam-lippert authored Sep 21, 2023
1 parent 10af62e commit 929c6cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ export class API {
}).captureException : () => {}

try {
const authReq = new Request('https://ctx.vin/api', {
const authReq = new Request('https://ctx.do/api', {
headers: {
cookie: req.headers.get('cookie'),
authorization: req.headers.get('authorization')
}
})

if (!env.CTX) console.warn('[CTX] env.CTX is undefined, using fetch to ctx.vin.')
if (!env.CTX) console.warn('[CTX] env.CTX is undefined, using fetch to ctx.do.')

const contextVin = env.CTX != undefined ? await env.CTX.fetch(authReq).then(x=>x.json()) : await fetch(authReq).then(res => res.json())

Expand Down Expand Up @@ -350,4 +350,4 @@ export const schemaGen = (obj) => {
}

return schema
}
}

2 comments on commit 929c6cd

@workers-do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 929c6cd Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

apis-do – ./

apis-do.dev.driv.ly
apis-do-git-main.dev.driv.ly
apis.do

Please sign in to comment.