You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Parameters:
10
10
-json
11
11
use JSON log format
12
12
-level string
13
-
one of debug/warn/error/off (default "info")
13
+
one of debug/info/warn/error/off (default "info")
14
14
-path string
15
15
path to search recursively for X-Erised-Response-File (default ".")
16
16
-port int
@@ -23,14 +23,26 @@ Parameters:
23
23
24
24
For help type **erised -h**
25
25
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.
27
27
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:
29
33
30
34
```sh
31
35
docker run --rm -p 8080:8080 edaddario/erised
32
36
```
33
37
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
+
34
46
HTTP methods (e.g. GET, POST, PATCH, etc.), query strings and body are **ignored**. URL routes are also ignored, except for:
35
47
36
48
|Name|Purpose|
@@ -107,6 +119,7 @@ Any other value will resolve to 200 (OK)
107
119
**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.
108
120
109
121
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
110
123
* https protocol is not yet supported
111
124
112
125
I may or may not address this in a future release. Caveat Emptor
0 commit comments