athis-ui/apps/backend-mock/middleware/1.api.ts

8 lines
195 B
TypeScript
Raw Normal View History

2024-11-06 10:35:56 +08:00
export default defineEventHandler((event) => {
if (event.method === 'OPTIONS') {
event.node.res.statusCode = 204;
event.node.res.statusMessage = 'No Content.';
return 'OK';
}
});