Skip to content

Vite fs allow not respecting individual files #5689

@skrenes

Description

@skrenes

Describe the bug

If I enter a file into the allow list, the logs show the Vite serving allow list properly, but Vite still reports the file "is outside of Vite serving allow list"

Reproduction

server: {
        fs: {
          allow: ['./$houdini', './houdini.config.js'],
        },
      },

Start server and I see this:

The request url "/home/node/app/houdini.config.js" is outside of Vite serving allow list.

- /home/node/app/static
- /home/node/app/src/lib
- /home/node/app/src/routes
- /home/node/app/src
- /home/node/app/.svelte-kit
- /home/node/app/node_modules
- /home/node/app/$houdini
- /home/node/app/houdini.config.js

Refer to docs https://vitejs.dev/config/#server-fs-allow for configurations and more details.

As you'll see, /home/node/app/houdini.config.js shows up in the allow list but Vite complains it's not in the allow list.

System Info

System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) x64 Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
    Memory: 3.68 GB / 31.25 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 17.1.0 - /usr/local/bin/node
    Yarn: 3.1.0 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions