sourcecred/config
William Chargin f448960105
Forbid accessing the `cache/` directory at runtime (#614)
Summary:
We plan to allow plugins to store permanent data in `$SC/data/` and
temporary, ephemeral, or intermediate data in `$SC/cache/`. The latter
subtree will be excluded from the static site at build time, so it
behooves us to also exclude it from the development environment.

Test Plan:
Run `yarn start`. Then,

```shell
$ root='localhost:8080/api/v1/data'
$ curl -sI "${root}/repositoryRegistry.json" | head -1
HTTP/1.1 200 OK
$ curl -sI "${root}/data/sourcecred/example-git/github/view.json" | head -1
HTTP/1.1 200 OK
$ curl -sI "${root}/cache" | head -1
HTTP/1.1 400 Bad Request
$ curl -sI "${root}/cache/" | head -1
HTTP/1.1 400 Bad Request
$ curl -sI "${root}/cache/foo" | head -1
HTTP/1.1 400 Bad Request
$ curl -sI "${root}/cache/foo/bar/baz" | head -1
HTTP/1.1 400 Bad Request
```

Also, check that the app still works.

wchargin-branch: exclude-cache-from-dev-server
2018-08-07 11:17:03 -07:00
..
jest Add jest-fetch-mock as dev dependency (#528) 2018-07-26 15:08:14 -07:00
RemoveBuildDirectoryPlugin.js Refine the build directory cleaning logic (#577) 2018-07-31 15:27:32 -07:00
babel.js Save the GitHub relational store from the CLI (#447) 2018-06-29 12:12:37 -07:00
env.js Turn on flow for config/env.js (#243) 2018-05-08 14:56:06 -07:00
makeWebpackConfig.js Forbid accessing the `cache/` directory at runtime (#614) 2018-08-07 11:17:03 -07:00
paths.js Remove the `start` CLI command and dependencies (#613) 2018-08-07 11:00:09 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
webpack.config.backend.js Don’t erase the `bin/` folder in CI (#317) 2018-05-29 15:40:42 -07:00