I'm looking at potential of using PWA, however when I put a manifest.webmanifest it ends up in a redirect loop and results in the browser returning a "Too many redirects error", this is the only resource which is doing this, I'm loading other resources, such as CSS, JS, Images, Favicon, robots.txt using the same method and not getting an issue
The server is running on localhost:8080 using HTTPS and HTTP/2
The Chrome DevTools console shows
GET https://localhost:8080/manifest.webmanifest net::ERR_TOO_MANY_REDIRECTS
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Title</title>
<meta name="description" content="Meta Description">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="stylesheet" href="/assets/uikit-3.5.9/css/uikit.min.css">
<link rel="stylesheet" href="/assets/css/app.min.css">
</head>
The manifest file itself is served by the web server which is written in Go using Gorilla Mux
r.PathPrefix("/manifest.webmanifest").Handler(http.FileServer(http.Dir(os.Getenv("PUBLIC_ROOT"))))
I have also tried using HandleFunc to construct and serve the manifest as well, but this results in a redirect loop as well.
If I navigate directly to the manifest in the browser it successfully loads successfully (without any redirects showing in the chrome dev tools)
Below is a screenshot of the chrome dev tools when navigating the website