mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-27 17:05:36 +02:00
Fix PWA for non-root web roots
This commit is contained in:
parent
6615aea5dc
commit
d7aacb8b24
5 changed files with 76 additions and 10 deletions
server
|
@ -245,6 +245,9 @@ func TestServer_WebEnabled(t *testing.T) {
|
|||
rr = request(t, s, "GET", "/sw.js", "", nil)
|
||||
require.Equal(t, 404, rr.Code)
|
||||
|
||||
rr = request(t, s, "GET", "/app.html", "", nil)
|
||||
require.Equal(t, 404, rr.Code)
|
||||
|
||||
rr = request(t, s, "GET", "/static/css/home.css", "", nil)
|
||||
require.Equal(t, 404, rr.Code)
|
||||
|
||||
|
@ -264,6 +267,9 @@ func TestServer_WebEnabled(t *testing.T) {
|
|||
|
||||
rr = request(t, s2, "GET", "/sw.js", "", nil)
|
||||
require.Equal(t, 200, rr.Code)
|
||||
|
||||
rr = request(t, s2, "GET", "/app.html", "", nil)
|
||||
require.Equal(t, 200, rr.Code)
|
||||
}
|
||||
|
||||
func TestServer_PublishLargeMessage(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue