Fix hardcoded IPv4 literals (#2602)

* Update server_test.go

no hardcoded IPv4 literals

* Update package.json

no hardcoded IPv4 literals
This commit is contained in:
certuna 2023-11-11 22:46:53 +01:00 committed by GitHub
parent e055826068
commit bae5fc946b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ var _ = Describe("AbsoluteURL", func() {
Expect(actual).To(Equal("https://myserver.com/share/img/123?a=xyz"))
})
It("does not override provided schema/host", func() {
r, _ := http.NewRequest("GET", "http://127.0.0.1/rest/ping?id=123", nil)
r, _ := http.NewRequest("GET", "http://localhost/rest/ping?id=123", nil)
actual := AbsoluteURL(r, "http://public.myserver.com/share/img/123", url.Values{"a": []string{"xyz"}})
Expect(actual).To(Equal("http://public.myserver.com/share/img/123?a=xyz"))
})
@ -35,7 +35,7 @@ var _ = Describe("AbsoluteURL", func() {
Expect(actual).To(Equal("https://myserver.com/music/share/img/123?a=xyz"))
})
It("does not override provided schema/host", func() {
r, _ := http.NewRequest("GET", "http://127.0.0.1/rest/ping?id=123", nil)
r, _ := http.NewRequest("GET", "http://localhost/rest/ping?id=123", nil)
actual := AbsoluteURL(r, "http://public.myserver.com/share/img/123", url.Values{"a": []string{"xyz"}})
Expect(actual).To(Equal("http://public.myserver.com/share/img/123?a=xyz"))
})
@ -52,7 +52,7 @@ var _ = Describe("AbsoluteURL", func() {
Expect(actual).To(Equal("https://myserver.com:8080/music/share/img/123?a=xyz"))
})
It("does not override provided schema/host", func() {
r, _ := http.NewRequest("GET", "http://127.0.0.1/rest/ping?id=123", nil)
r, _ := http.NewRequest("GET", "http://localhost/rest/ping?id=123", nil)
actual := AbsoluteURL(r, "http://public.myserver.com/share/img/123", url.Values{"a": []string{"xyz"}})
Expect(actual).To(Equal("http://public.myserver.com/share/img/123?a=xyz"))
})

View File

@ -58,7 +58,7 @@
"update-workbox": "bin/update-workbox.sh"
},
"homepage": ".",
"proxy": "http://127.0.0.1:4633/",
"proxy": "http://localhost:4633/",
"eslintConfig": {
"extends": [
"react-app",