Skip to content

Commit

Permalink
Add HEAD methods
Browse files Browse the repository at this point in the history
  • Loading branch information
srosset81 committed Aug 1, 2024
1 parent c16a529 commit 8cf4087
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 5 deletions.
14 changes: 13 additions & 1 deletion src/pages/.well-known/context.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,16 @@ export const GET: APIRoute = async () => {
}
}
);
};
};

export const HEAD: APIRoute = async () => {
return new Response(undefined,
{
status: 200,
headers: {
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
};
14 changes: 13 additions & 1 deletion src/pages/context.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,4 +1053,16 @@ export const GET: APIRoute = async () => {
}
}
);
};
};

export const HEAD: APIRoute = async () => {
return new Response(undefined,
{
status: 200,
headers: {
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
};
15 changes: 14 additions & 1 deletion src/pages/data/[container]/[resource].ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ export const GET: APIRoute = async ({ request, params }) => {
{
status: 200,
headers: {
"Content-Type": "application/ld+json"
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
}

export const HEAD: APIRoute = async () => {
return new Response(undefined,
{
status: 200,
headers: {
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
};
15 changes: 14 additions & 1 deletion src/pages/data/[container]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ export const GET: APIRoute = async ({ request, params }) => {
{
status: 200,
headers: {
"Content-Type": "application/ld+json"
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
}

export const HEAD: APIRoute = async () => {
return new Response(undefined,
{
status: 200,
headers: {
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
};
15 changes: 14 additions & 1 deletion src/pages/data/trusted-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,20 @@ export const GET: APIRoute = async ({ request }) => {
{
status: 200,
headers: {
"Content-Type": "application/ld+json"
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
};

export const HEAD: APIRoute = async () => {
return new Response(undefined,
{
status: 200,
headers: {
"Content-Type": "application/ld+json",
"Access-Control-Allow-Origin": "*"
}
}
);
Expand Down

0 comments on commit 8cf4087

Please sign in to comment.