Skip to content

Commit

Permalink
Replaces 0.0.0.0 on the codebase (#388)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Phelps <[email protected]>
  • Loading branch information
edumucelli and markphelps authored Mar 10, 2021
1 parent 153a27f commit b8d0ac8
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Happy Halloween! Flipt goes 1.0.0 today! :jack_o_lantern:

```yaml
server:
host: 0.0.0.0
host: 127.0.0.1
http_port: 8080
grpc_port: 9000
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Try Flipt out yourself with Docker:
❯ docker run --rm -p 8080:8080 -p 9000:9000 -t markphelps/flipt:latest
```

Flipt UI will now be reachable at [http://0.0.0.0:8080/](http://0.0.0.0:8080).
Flipt UI will now be reachable at [http://127.0.0.1:8080/](http://127.0.0.1:8080).

For more permanent methods of running Flipt, see the [Installation](https://flipt.io/docs/installation/) section.

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func Default() *Config {
},

Server: ServerConfig{
Host: "0.0.0.0",
Host: "127.0.0.1",
Protocol: HTTP,
HTTPPort: 8080,
HTTPSPort: 443,
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestLoad(t *testing.T) {
},

Server: ServerConfig{
Host: "0.0.0.0",
Host: "127.0.0.1",
Protocol: HTTP,
HTTPPort: 8080,
HTTPSPort: 443,
Expand Down
2 changes: 1 addition & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# server:
# protocol: http
# host: 0.0.0.0
# host: 127.0.0.1
# https_port: 443
# http_port: 8080
# grpc_port: 9000
Expand Down
2 changes: 1 addition & 1 deletion config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ log:

# server:
# protocol: http
# host: 0.0.0.0
# host: 127.0.0.1
# https_port: 443
# http_port: 8080
# grpc_port: 9000
Expand Down
2 changes: 1 addition & 1 deletion config/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ log:

server:
protocol: https
host: 0.0.0.0
host: 127.0.0.1
http_port: 8080
https_port: 443
grpc_port: 9000
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# server:
# protocol: http
# host: 0.0.0.0
# host: 127.0.0.1
# https_port: 443
# http_port: 8080
# grpc_port: 9000
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# server:
# protocol: http
# host: 0.0.0.0
# host: 127.0.0.1
# https_port: 443
# http_port: 8080
# grpc_port: 9000
Expand Down
2 changes: 1 addition & 1 deletion test/api
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ run()

sleep 5

flipt_host="0.0.0.0:8080"
flipt_host="127.0.0.1:8080"

echo -e "\e[32m \e[0m"
echo -e "\e[32m===========================================\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion test/qawolf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ run()

sleep 5

flipt_host="0.0.0.0:8080"
flipt_host="127.0.0.1:8080"

echo -e "\e[32m \e[0m"
echo -e "\e[32m===========================================\e[0m"
Expand Down
6 changes: 3 additions & 3 deletions ui/__tests__/e2e/createFlag.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ afterAll(async () => {
});

test("createFlag", async () => {
await page.goto("http://0.0.0.0:8080");
await page.goto("http://127.0.0.1:8080");
await page.click("[data-testid='new-flag']");
await page.type("[placeholder='Flag name']", "Awesome new feature");
await page.type("[placeholder='Flag description']", "Our product manager cannot wait to ship this!");
await page.click("[data-testid='create-flag']");
});

test('createFlagDisallowSpecialChars', async () => {
await page.goto("http://0.0.0.0:8080");
await page.goto("http://127.0.0.1:8080");
await page.click("[data-testid='new-flag']");
await page.type("[placeholder='Flag name']", "My flag with colons");
await page.type("[placeholder='Flag key']", "colons:are:not:allowed");
await page.type("[placeholder='Flag description']", "This should not be saved");
await expect(page).toHaveText("Only letters, numbers, hypens and underscores allowed");
});
});
6 changes: 3 additions & 3 deletions ui/__tests__/e2e/createSegment.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ afterAll(async () => {
});

test("createSegment", async () => {
await page.goto("http://0.0.0.0:8080");
await page.goto("http://127.0.0.1:8080");
await page.click("[data-testid='segments']");
await page.click("[data-testid='new-segment']");
await page.click("[placeholder='Segment name']");
Expand All @@ -28,11 +28,11 @@ test("createSegment", async () => {
});

test('createSegmentDisallowSpecialChars', async () => {
await page.goto("http://0.0.0.0:8080");
await page.goto("http://127.0.0.1:8080");
await page.click("[data-testid='segments']");
await page.click("[data-testid='new-segment']");
await page.type("[placeholder='Segment name']", "My segment with colons");
await page.type("[placeholder='Segment key']", "colons:are:not:allowed");
await page.type("[placeholder='Segment description']", "This should not be saved");
await expect(page).toHaveText("Only letters, numbers, hypens and underscores allowed");
});
});
2 changes: 1 addition & 1 deletion ui/src/services/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";

let host =
process.env.NODE_ENV === "production" ? window.location.host : "0.0.0.0:8080";
process.env.NODE_ENV === "production" ? window.location.host : "127.0.0.1:8080";

export const Api = axios.create({
baseURL: "//" + host + "/api/v1/"
Expand Down

0 comments on commit b8d0ac8

Please sign in to comment.