fix: passing command line arguments
Since we already have `webwolf.port` it makes sense to also define `webwolf.port` explicitly and not rely on `server.port` Closes: #1910
This commit is contained in:
parent
e5d5a370f9
commit
52c20738f9
10
README.md
10
README.md
@ -85,6 +85,16 @@ java -Dfile.encoding=UTF-8 -jar webgoat-2023.8.jar
|
|||||||
|
|
||||||
Click the link in the log to start WebGoat.
|
Click the link in the log to start WebGoat.
|
||||||
|
|
||||||
|
### 3.1 Running on a different port
|
||||||
|
|
||||||
|
If for some reason you want to run WebGoat on a different port, you can do so by adding the following parameter:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
java -jar webgoat-2023.8.jar --webgoat.port=8001 --webwolf.port=8002
|
||||||
|
```
|
||||||
|
|
||||||
|
For a full overview of all the parameters you can use, please check the [WebGoat properties file](webgoat-container/src/main/resources/application-{webgoat, webwolf}.properties).
|
||||||
|
|
||||||
## 4. Run from the sources
|
## 4. Run from the sources
|
||||||
|
|
||||||
### Prerequisites:
|
### Prerequisites:
|
||||||
|
@ -28,7 +28,6 @@ package org.owasp.webgoat.server;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.owasp.webgoat.container.WebGoat;
|
import org.owasp.webgoat.container.WebGoat;
|
||||||
import org.owasp.webgoat.webwolf.WebWolf;
|
import org.owasp.webgoat.webwolf.WebWolf;
|
||||||
import org.springframework.boot.Banner;
|
|
||||||
import org.springframework.boot.ResourceBanner;
|
import org.springframework.boot.ResourceBanner;
|
||||||
import org.springframework.boot.WebApplicationType;
|
import org.springframework.boot.WebApplicationType;
|
||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
|
@ -2,7 +2,7 @@ server.error.include-stacktrace=always
|
|||||||
server.error.path=/error.html
|
server.error.path=/error.html
|
||||||
server.servlet.context-path=${WEBGOAT_CONTEXT:/WebGoat}
|
server.servlet.context-path=${WEBGOAT_CONTEXT:/WebGoat}
|
||||||
server.servlet.session.persistent=false
|
server.servlet.session.persistent=false
|
||||||
server.port=${WEBGOAT_PORT:8080}
|
server.port=${webgoat.port}
|
||||||
server.address=${WEBGOAT_HOST:127.0.0.1}
|
server.address=${WEBGOAT_HOST:127.0.0.1}
|
||||||
webgoat.host=${WEBGOAT_HOST:127.0.0.1}
|
webgoat.host=${WEBGOAT_HOST:127.0.0.1}
|
||||||
webgoat.port=${WEBGOAT_PORT:8080}
|
webgoat.port=${WEBGOAT_PORT:8080}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user