re-add workers ai auth

This commit is contained in:
Ishaan Dey 2024-05-17 22:26:27 -07:00
parent fa6a92b9b4
commit 7981af1451

View File

@ -8,9 +8,9 @@ export default {
if (request.method !== 'GET') {
return new Response('Method Not Allowed', { status: 405 });
}
// if (request.headers.get('Authorization') !== env.KEY) {
// return new Response('Unauthorized', { status: 401 });
// }
if (request.headers.get('Authorization') !== env.KEY) {
return new Response('Unauthorized', { status: 401 });
}
const url = new URL(request.url);
const fileName = url.searchParams.get('fileName');