Skip to content
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

Merged
merged 2 commits into from
Sep 27, 2023
Merged

Fix CORS issue for custom plugins #403

merged 2 commits into from
Sep 27, 2023

Conversation

dehoward
Copy link
Contributor

@dehoward dehoward commented Sep 26, 2023

Motivation and Context

fixes #380.

Instacart plugin:
image
image

Listennotes plugin:
image
image

Description

moves the fetching of the custom plugin's manifest to the backend to avoid the CORS policy enforced by browsers.

Contribution Checklist

@dehoward dehoward self-assigned this Sep 26, 2023
@github-actions github-actions bot added webapp Pull requests that update Typescript code webapi Pull requests that update .net code PR: ready for review labels Sep 26, 2023
@TaoChenOSU
Copy link
Contributor

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.

@TaoChenOSU
Copy link
Contributor

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.

@dehoward dehoward added this pull request to the merge queue Sep 27, 2023
Merged via the queue into microsoft:main with commit e99aeb0 Sep 27, 2023
@dehoward dehoward deleted the fix-custom-plugin-cors branch September 27, 2023 19:46
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### 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 😄
kb0039 pushed a commit to aaronba/chat-copilot that referenced this pull request Jan 8, 2025
### 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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
webapi Pull requests that update .net code webapp Pull requests that update Typescript code
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

The "Custom Plugin" option doesn't work.
5 participants