Adding skills & isac talent updates
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
AiMechanicRateLimitError,
|
||||
reserveAiMechanicGeneration
|
||||
} from '$lib/server/ai/mechanic-authoring-rate-limit';
|
||||
import { isAllowedShdBuildRequestOrigin } from '$lib/server/request-origin';
|
||||
import { json } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
@@ -26,7 +27,7 @@ export const POST: RequestHandler = async ({ cookies, request, url }) => {
|
||||
'ai.mechanic.generate'
|
||||
);
|
||||
const origin = request.headers.get('origin');
|
||||
if (origin && origin !== url.origin) {
|
||||
if (!isAllowedShdBuildRequestOrigin(origin, url.origin)) {
|
||||
return json(
|
||||
{ message: 'Cross-origin mechanic authoring requests are not allowed.' },
|
||||
{ status: 403 }
|
||||
|
||||
Reference in New Issue
Block a user