diff --git a/auth.js b/auth.js index d3c4d0f..3619ced 100644 --- a/auth.js +++ b/auth.js @@ -26,7 +26,7 @@ export class Auth { search.set('client_id', this.giteaClientId) search.set( 'redirect_uri', - this.remoteBaseUrl + '/auth/callback' + this.remoteBaseUrl + '/api/auth/callback' ) search.set('state', state) url.search = search.toString() @@ -50,9 +50,9 @@ export class Auth { name: 'oauth.gitea.state', value: state, }) - return new Response('', { + event.respondWith(new Response('', { headers, status: 302, - }) + })) } } \ No newline at end of file