Pull request: home: don't allow all origins

Merge in DNS/adguard-home from 2484-access-control to master

Updates .

Squashed commit of the following:

commit 4f0c6ddae35b55a9251f4d5e14c4d92fd2107443
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Feb 5 12:42:22 2021 +0300

    home: don't allow all origins
This commit is contained in:
Ainar Garipov 2021-02-05 14:11:53 +03:00
parent c9d2436d77
commit bc01f4f8bc
3 changed files with 71 additions and 23 deletions
internal/home

View file

@ -133,7 +133,7 @@ func TestHome(t *testing.T) {
h := http.Client{}
for i := 0; i != 50; i++ {
resp, err = h.Get("http://127.0.0.1:3000/")
if err == nil && resp.StatusCode != 404 {
if err == nil && resp.StatusCode != http.StatusNotFound {
break
}
time.Sleep(100 * time.Millisecond)