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

Support wildcard matching in server.fs.allow list #15977

Open
4 tasks done
smeng9 opened this issue Feb 20, 2024 · 1 comment
Open
4 tasks done

Support wildcard matching in server.fs.allow list #15977

smeng9 opened this issue Feb 20, 2024 · 1 comment

Comments

@smeng9
Copy link
Contributor

smeng9 commented Feb 20, 2024

Description

The issue arises when we are following the workaround in #15957 (comment) for in the original issue #15945 that the fonts cannot be rendered correctly

Our developers install the packages on local environments and each developer has a different username. The current server.fs.allow does not support wildcard folder names in the path, which makes it difficult for us to synchronize the vite.config.ts file on git. We also don't want to switch the allowed path to the root folder or disable server.fs.strict for security reasons.

Suggested solution

The server.fs.allow should match patterns with * in the path string.

This will make it consistent with server.fs.deny

Alternative

No response

Additional context

To reproduce the issue, clone the repo in https://stackblitz.com/edit/github-tmpxuz-g4gr11?file=src%2FApp.jsx and install with yarn pnp.

Change the server.fs.allow to in vite.config.ts
[searchForWorkspaceRoot(process.cwd()), "/Users/<your user name(replace with *)>/.yarn/berry/cache/@fontsource-roboto-npm-5.0.8-35f6bafae2-10c0.zip/node_modules/"] to reproduce the issue.

Validations

Copy link

stackblitz bot commented Feb 20, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

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

No branches or pull requests

2 participants