-
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
Open
Yusuf023
wants to merge
15
commits into
Meeting-BaaS:main
Choose a base branch
from
Yusuf023:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
46703d0
fix: react version rolled back to 18 to resolve peer dependencies
Yusuf023 92b28c4
fix: next.js config correction for react 18
Yusuf023 a864e06
fix: cors resolutions for proxy and auth
Yusuf023 3a46296
fix: meeting baas api URL correction
Yusuf023 cddfe2c
fix: auth redirect URL correction
Yusuf023 59a896e
fix: auth no session run time error
Yusuf023 093bea3
Merge pull request #1 from Yusuf023/minor-bug-fixes
Yusuf023 b791d8d
Update apps/proxy/server/middleware/cors.ts
Lazare-42 88a820a
Update apps/proxy/server/middleware/meetingbaas-proxy.ts
Lazare-42 0eda86e
Update apps/proxy/server/middleware/s3-proxy.ts
Lazare-42 cfd1578
Update apps/proxy/server/middleware/meetingbaas-proxy.ts
Lazare-42 22be05f
Update apps/proxy/server/middleware/s3-proxy.ts
Lazare-42 e055aea
Update apps/proxy/server/middleware/cors.ts
Lazare-42 847895f
fix: code review changes
Yusuf023 ffcedc8
fix: local development uses http
Yusuf023 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useRuntimeConfig } from '#imports'; | ||
import { defineEventHandler, handleCors } from 'h3'; | ||
|
||
export default defineEventHandler((event) => { | ||
const config = useRuntimeConfig(event); | ||
const trustedOrigins = config.trustedOrigins ? config.trustedOrigins.split(',') : []; | ||
const corsHandled = handleCors(event, { | ||
origin: trustedOrigins, | ||
preflight: { | ||
statusCode: 204, | ||
}, | ||
credentials: true, | ||
methods: '*', | ||
}); | ||
|
||
if (corsHandled) { | ||
return; | ||
} | ||
// Continue to the next handler for non-CORS requests | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { createProxyEventHandler } from 'h3-proxy'; | ||
import { eventHandler } from 'h3'; | ||
import { useRuntimeConfig } from '#imports'; | ||
|
||
export default eventHandler((event) => { | ||
const config = useRuntimeConfig(event); | ||
const meetingBaasApiUrl = config.meetingBaasApiUrl; | ||
|
||
if (!meetingBaasApiUrl) { | ||
throw new Error('Missing meetingBaasApiUrl in runtime config'); | ||
} | ||
|
||
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
|
||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { createProxyEventHandler } from 'h3-proxy'; | ||
import { eventHandler, createError } from 'h3'; | ||
import { useRuntimeConfig } from '#imports'; | ||
|
||
export default eventHandler((event) => { | ||
const { meetingBaasS3Url } = useRuntimeConfig(event); | ||
|
||
if (!meetingBaasS3Url) { | ||
console.error('Missing configuration: meetingBaasS3Url'); | ||
throw createError({ | ||
statusCode: 500, | ||
message: 'Server configuration error', | ||
}); | ||
} | ||
|
||
const proxy = createProxyEventHandler({ | ||
target: meetingBaasS3Url, | ||
pathRewrite: { | ||
'^/api/s3': '', | ||
}, | ||
pathFilter: ['/api/s3/**'], | ||
}); | ||
|
||
try { | ||
return proxy(event); | ||
} catch (error) { | ||
console.error('S3 proxy error:', error); | ||
throw createError({ | ||
statusCode: 502, | ||
message: 'Error connecting to storage service', | ||
}); | ||
} | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.