Skip to content

Fix CORS issue #126

Open
behei-vonage wants to merge 2 commits intomainfrom
behei-vonage/fix-cors
Open

Fix CORS issue #126
behei-vonage wants to merge 2 commits intomainfrom
behei-vonage/fix-cors

Conversation

@behei-vonage
Copy link

Currently, there is a CORS issue happening when you try to run the app locally. This PR fixes that by moving the API requests to the backend instead of making them in the frontend.

server.js Outdated
app.post('/graphql', async (req, res) => {
try {
const token = isTokBoxApiKey
? createTokenTokBox(API_KEY, API_SECRET)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can rename them as createOpentokToken and createVonageToken

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I was just using the existing naming but I can re-name 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants