Skip to content

Possible to access files outside of webpack output path #889

Closed
@edmorley

Description

Broken out of #887.

It's possible to access files that would not end up in the webpack output path (eg dist/) for the full webpack build.

STR:

  1. Install nodejs 7.x, webpack 2.4.1 and webpack-dev-server 2.4.4
  2. Create a new project based on https://webpack.js.org/guides/get-started/#using-webpack-with-a-config (and save dependencies to package.json, init a git repo etc)
  3. Run ./node_modules/.bin/webpack-dev-server
  4. In another terminal, try requests like (or for any other file that wouldn't be copied to dist/):
  • curl -i localhost:8080/package.json
  • curl -i localhost:8080/.git/config

Expected:
HTTP 404s or similar.

Actual:
HTTP 200s for cases where the file exists, along with the file contents.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions