Skip to content

Commit ab60068

Browse files
authored
Merge pull request #14 from sygmaprotocol/mmuftic/flag-name-fix
fix: rename flag
2 parents 3e7faf6 + 68483cc commit ab60068

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ Each JSON configuration file for the gateways can specify detailed settings for
107107
```
108108

109109
## Authentication
110-
Basic authentication can be enabled using the `--basic-auth` flag. The username and password should be set through environment variables `GATEWAY_USERNAME` and `GATEWAY_PASSWORD`, respectively.
110+
Basic authentication can be enabled using the `--auth` flag. The username and password should be set through environment variables `GATEWAY_USERNAME` and `GATEWAY_PASSWORD`, respectively.
111111

112112
### Running the Application
113113
To run the application with authentication:
114114

115115
```
116-
DEBUG=true GATEWAY_USERNAME=myuser GATEWAY_PASSWORD=mypass go run . --config config.json --basic-auth
116+
DEBUG=true GATEWAY_USERNAME=myuser GATEWAY_PASSWORD=mypass go run . --config config.json --auth
117117
```

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
Value: false,
6060
},
6161
&cli.BoolFlag{
62-
Name: "basic-auth",
62+
Name: "auth",
6363
Usage: "Enable basic authentication.",
6464
Value: false,
6565
},
@@ -79,7 +79,7 @@ func main() {
7979
r.Use(middleware.Recoverer)
8080
r.Use(middleware.Heartbeat("/health"))
8181
// Add basic auth middleware
82-
if cc.Bool("basic-auth") {
82+
if cc.Bool("auth") {
8383
username := os.Getenv("GATEWAY_USERNAME")
8484
password := os.Getenv("GATEWAY_PASSWORD")
8585
if username == "" || password == "" {

0 commit comments

Comments
 (0)