Skip to content

Commit 03ee7f1

Browse files
committed
Update README.md
1 parent be9a3f0 commit 03ee7f1

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Parameters:
1010
-json
1111
use JSON log format
1212
-level string
13-
one of debug/warn/error/off (default "info")
13+
one of debug/info/warn/error/off (default "info")
1414
-path string
1515
path to search recursively for X-Erised-Response-File (default ".")
1616
-port int
@@ -23,14 +23,26 @@ Parameters:
2323

2424
For help type **erised -h**
2525

26-
Upon executing **erised** with no parameters it will listen on port **8080** for incoming http requests.
26+
Upon executing **erised** with no parameters, the server will listen on port **8080** for incoming http requests.
2727

28-
The latest version is available as a Docker image at [edaddario/erised](https://hub.docker.com/r/edaddario/erised)
28+
When using the _-path_ option, please **EXERCISE GREAT CAUTION** choosing the path to search. See **Known Issues** for more information.
29+
30+
The latest version is also available as a Docker image at [edaddario/erised](https://hub.docker.com/r/edaddario/erised).
31+
32+
To start the server in a docker container, with defaults values, exceute the following command:
2933

3034
```sh
3135
docker run --rm -p 8080:8080 edaddario/erised
3236
```
3337

38+
If you would like to return file based responses (_X-Erised-Response-File_ set) when using the docker image, you'll need to map the directory containing your local files and set the _-path_ option accordingly.
39+
40+
The following example maps the **/local_directory/response_files** directory in your local machine to **/files** in the docker image, and then sets the **-path** option:
41+
42+
```sh
43+
docker run --rm -p 8080:8080 -v /local_directory/response_files:/files edaddario/erised -path ./files
44+
```
45+
3446
HTTP methods (e.g. GET, POST, PATCH, etc.), query strings and body are **ignored**. URL routes are also ignored, except for:
3547

3648
|Name|Purpose|
@@ -107,6 +119,7 @@ Any other value will resolve to 200 (OK)
107119
**erised** is full of bugs and "_...men have wasted away before it, not knowing if what they have seen is real, or even possible..._" so use it with caution for it gives no knowledge or truth.
108120

109121
Of all of its deficiencies, the most notable is:
122+
* Using the _-path_ option could lead to significant security risks. By default, **erised** sets this option to point to the same directory in which is running and, when the _X-Erised-Response-File_ header is set, it will search recursively for a matching filename in the current directory and **all** subdirectories underneath, returning the contents of the first match. For example, if you set this value to your root directory (_-path=/_) **erised** will scan the entire volume for a match
110123
* https protocol is not yet supported
111124

112125
I may or may not address this in a future release. Caveat Emptor

0 commit comments

Comments
 (0)