Skip to content

Commit ec2ee46

Browse files
committed
Attempt to fix CORS
1 parent 9825637 commit ec2ee46

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/server/api/src/app/flow-template/cloud-template.controller.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ export const cloudTemplateController: FastifyPluginAsyncTypebox = async (
2323
return;
2424
}
2525

26-
// cloud templates are available on any origin
27-
app.addHook('onSend', allowAllOriginsHookHandler);
28-
2926
app.get(
3027
'/',
3128
{
29+
onSend: [allowAllOriginsHookHandler],
3230
config: {
3331
allowedPrincipals: ALL_PRINCIPAL_TYPES,
3432
skipAuth: true,
@@ -70,6 +68,7 @@ export const cloudTemplateController: FastifyPluginAsyncTypebox = async (
7068
app.get(
7169
'/:id',
7270
{
71+
onSend: [allowAllOriginsHookHandler],
7372
config: {
7473
allowedPrincipals: ALL_PRINCIPAL_TYPES,
7574
skipAuth: true,

0 commit comments

Comments
 (0)