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

fetch('/__open-in-editor') in error overlay does not respect base #142

Closed
2 tasks done
ascott18 opened this issue Jun 17, 2022 · 1 comment
Closed
2 tasks done

fetch('/__open-in-editor') in error overlay does not respect base #142

ascott18 opened this issue Jun 17, 2022 · 1 comment

Comments

@ascott18
Copy link
Contributor

Describe the bug

Same as vitejs/vite#8627. Requests to __open-in-editor need to respect base because the middleware for __open-in-editor runs after the middleware that strips off base and rejects requests that didn't include base.

Reproduction

  • Configure an app with a base in vite's config
  • Introduce an error that causes checker's overlay to appear
  • Click a file link
  • Observe that nothing happens.

Expected behavior

__open-in-editor is requested with base prepended.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 6.59 GB / 31.94 GB
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 102.0.5005.115
    Edge: Spartan (44.19041.1266.0), Chromium (102.0.1245.41)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vite-plugin-checker: 0.4.6 => 0.4.6

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fi3ework
Copy link
Owner

fi3ework commented Jun 25, 2022

@ascott18 I would like to fix this as we should keep the same strategy with __vite_ping. But I'm confused that I still can open an editor even with a base field by clicking on the UI on my mac. But when I open the __open-in-editor fetch request in a new tab. It shows me that The server is configured with a public base URL of /a/b/c/ - did you mean to visit. Did I miss something or is there some difference between mac and Windows? 🤔

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

No branches or pull requests

2 participants