-
Notifications
You must be signed in to change notification settings - Fork 712
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
Fix CORS issue for custom plugins #403
Conversation
webapp/src/components/open-api-plugins/plugin-wizard/steps/ValidateManifestStep.tsx
Outdated
Show resolved
Hide resolved
We are about to move all plugins to the backend. this may not be necessary once that's done. Let me confirm if we still want to allow users to add custom plugins from the frontend. |
We will not modify the custom plugin flow in the first iteration. Please ignore the comment. |
### Motivation and Context <!-- Thank you for your contribution to the chat-copilot repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> fixes microsoft#380. **Instacart plugin:** <img width="234" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/277fbb12-d800-4002-bcc9-7c44bd64c3de"> <img width="234" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/51fa1c0b-e9fc-4d5a-baf6-da4381ca87f1"> **Listennotes plugin:** <img width="236" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/f0815449-968c-4899-9cd1-c0680399b5cc"> <img width="235" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/2fab7355-ca97-438f-84f0-7d3c41d6a918"> ### Description moves the fetching of the custom plugin's manifest to the backend to avoid the [CORS policy](https://web.dev/cross-origin-resource-sharing/) enforced by browsers. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation and Context <!-- Thank you for your contribution to the chat-copilot repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> fixes microsoft#380. **Instacart plugin:** <img width="234" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/277fbb12-d800-4002-bcc9-7c44bd64c3de"> <img width="234" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/51fa1c0b-e9fc-4d5a-baf6-da4381ca87f1"> **Listennotes plugin:** <img width="236" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/f0815449-968c-4899-9cd1-c0680399b5cc"> <img width="235" alt="image" src="https://github.com/microsoft/chat-copilot/assets/52973358/2fab7355-ca97-438f-84f0-7d3c41d6a918"> ### Description moves the fetching of the custom plugin's manifest to the backend to avoid the [CORS policy](https://web.dev/cross-origin-resource-sharing/) enforced by browsers. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
Motivation and Context
fixes #380.
Instacart plugin:
![image](https://private-user-images.githubusercontent.com/52973358/270706086-277fbb12-d800-4002-bcc9-7c44bd64c3de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4ODQzMD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1BbXotU2lnbmF0dXJlPTZmZjllY2I3OTNmNjQ5NGY0MDY1ZTk3MTQyODg2ZTg3M2QwM2RiMGM5NGY5YTc4NzU0ZTI0OTk0ZGE3YTkxZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eGU6PvqVUeWZ3hLZqt_-WAb09_KqDfwPqJMN2TaU05M)
Listennotes plugin:
![image](https://private-user-images.githubusercontent.com/52973358/270706452-f0815449-968c-4899-9cd1-c0680399b5cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4ODQzMDIsIm5iZiI6MTczOTg4NDAwMiwicGF0aCI6Ii81Mjk3MzM1OC8yNzA3MDY0NTItZjA4MTU0NDktOTY4Yy00ODk5LTljZDEtYzA2ODAzOTliNWNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE4VDEzMDY0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmZTNiZTdkYWQ5MTFiZjgwODQxMWFmYTNiNWQ0MGEwYTZmNDY2YmVjZjFlZDY2ZDhjMzExYjM1OGNiOWNmYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.8JJiBrCSIuLyLuY4BmMoTiGGlPlgwwbJPl0rT223bV4)
![image](https://private-user-images.githubusercontent.com/52973358/270706393-2fab7355-ca97-438f-84f0-7d3c41d6a918.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4ODQzMDIsIm5iZiI6MTczOTg4NDAwMiwicGF0aCI6Ii81Mjk3MzM1OC8yNzA3MDYzOTMtMmZhYjczNTUtY2E5Ny00MzhmLTg0ZjAtN2QzYzQxZDZhOTE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE4VDEzMDY0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkNDIyNjdmZDBmNDVkNDNhYzc4NmJjMTgzMTJmNTM5MDFjMWFhMDE2ODU2NDJhMTBmZjBhM2E4MzkxYzhjNzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YgYNHSM1HV7BA3n3wUkNIFny_2oz3eoz-2nRcob-_0E)
Description
moves the fetching of the custom plugin's manifest to the backend to avoid the CORS policy enforced by browsers.
Contribution Checklist