-
Notifications
You must be signed in to change notification settings - Fork 18
Minor bug fixes #1 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
46703d0
92b28c4
a864e06
3a46296
cddfe2c
59a896e
093bea3
b791d8d
88a820a
0eda86e
cfd1578
22be05f
e055aea
847895f
ffcedc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| export default defineEventHandler((event) => { | ||
| const trustedOrigins = useRuntimeConfig(event).trustedOrigins.split(','); | ||
Lazare-42 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const corsHandled = handleCors(event, { | ||
| origin: trustedOrigins, | ||
| preflight: { | ||
| statusCode: 204, | ||
| }, | ||
| credentials: true, | ||
| methods: '*', | ||
| }); | ||
|
|
||
| if (corsHandled) { | ||
| return; | ||
| } | ||
| }); | ||
Lazare-42 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Missing default handler for non-CORS requests The middleware returns early if CORS is handled, but doesn't provide a default path for when CORS isn't handled. This might lead to incomplete request processing if this is the only middleware in the chain. if (corsHandled) {
return;
}
+ // Continue to the next handler for non-CORS requests
});
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { createProxyEventHandler } from 'h3-proxy'; | ||
|
|
||
| export default eventHandler((event) => { | ||
| const { meetingBaasApiUrl } = useRuntimeConfig(event); | ||
Lazare-42 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| const proxy = createProxyEventHandler({ | ||
| target: meetingBaasApiUrl, | ||
| pathRewrite: { | ||
| '^/api/meetingbaas': '', | ||
| }, | ||
| pathFilter: ['/api/meetingbaas/**'], | ||
| }); | ||
|
|
||
| return proxy(event); | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }); | ||
Lazare-42 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { createProxyEventHandler } from 'h3-proxy'; | ||
|
|
||
| export default eventHandler((event) => { | ||
| const { meetingBaasS3Url } = useRuntimeConfig(event); | ||
|
|
||
| const proxy = createProxyEventHandler({ | ||
| target: meetingBaasS3Url, | ||
| pathRewrite: { | ||
| '^/api/s3': '', | ||
| }, | ||
| pathFilter: ['/api/s3/**'], | ||
| }); | ||
|
|
||
| return proxy(event); | ||
| }); | ||
Lazare-42 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,8 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@meeting-baas/shared": "workspace:*", | ||
| "@types/react": "catalog:react19", | ||
| "@types/react-dom": "catalog:react19", | ||
| "@types/react": "catalog:", | ||
| "@types/react-dom": "catalog:", | ||
| "cross-env": "^7.0.3", | ||
| "turbo": "^2.2.3", | ||
| "typescript": "^5.2.2" | ||
|
|
@@ -50,4 +50,4 @@ | |
| } | ||
| }, | ||
| "packageManager": "[email protected]" | ||
| } | ||
| } | ||
Lazare-42 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.