Skip to content

Commit 153ccf8

Browse files
committed
feat: add new exercises for discovery and solutions, including problem and solution implementations
1 parent be23dcf commit 153ccf8

File tree

121 files changed

+56478
-946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+56478
-946
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# CORS
File renamed without changes.

exercises/03.initialize-flow/01.problem/package.json renamed to exercises/01.discovery/01.problem.cors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "exercises_03.initialize-flow_01.problem",
2+
"name": "exercises_01.discovery_01.problem.cors",
33
"private": true,
44
"type": "module",
55
"scripts": {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

exercises/03.initialize-flow/01.problem/src/utils.ts renamed to exercises/01.discovery/01.problem.cors/src/utils.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ export function withCors({
1515

1616
// Handle CORS preflight requests
1717
if (request.method === 'OPTIONS') {
18-
return new Response(null, {
19-
status: 204,
20-
headers: mergeHeaders(corsHeaders, {
21-
'Access-Control-Max-Age': '86400',
22-
}),
18+
const headers = mergeHeaders(corsHeaders, {
19+
'Access-Control-Max-Age': '86400',
2320
})
21+
22+
return new Response(null, { status: 204, headers })
2423
}
2524

2625
// Call the original handler

0 commit comments

Comments
 (0)