File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -815,7 +815,6 @@ var (
815
815
"template" ,
816
816
"user" ,
817
817
"favicon.ico" ,
818
- "serviceworker.js" ,
819
818
}
820
819
821
820
reservedUserPatterns = []string {"*.keys" , "*.gpg" }
Original file line number Diff line number Diff line change @@ -45,17 +45,12 @@ func GetUserByParams(ctx *context.Context) *models.User {
45
45
func Profile (ctx * context.Context ) {
46
46
uname := ctx .Params (":username" )
47
47
48
- // Special handle for requests ` favicon.ico` and `serviceworker.js` .
48
+ // Special handle for FireFox requests favicon.ico.
49
49
if uname == "favicon.ico" {
50
50
ctx .ServeFile (path .Join (setting .StaticRootPath , "public/img/favicon.png" ))
51
51
return
52
52
}
53
53
54
- if uname == "serviceworker.js" {
55
- ctx .ServeFile (path .Join (setting .StaticRootPath , "public/serviceworker.js" ))
56
- return
57
- }
58
-
59
54
if strings .HasSuffix (uname , ".png" ) {
60
55
ctx .Error (404 )
61
56
return
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default async function initServiceWorker() {
35
35
// the spec strictly requires it to be same-origin so it has to be AppSubUrl to work
36
36
await Promise . all ( [
37
37
checkCacheValidity ( ) ,
38
- navigator . serviceWorker . register ( `${ AppSubUrl } /serviceworker.js` ) ,
38
+ navigator . serviceWorker . register ( `${ AppSubUrl } /assets/ serviceworker.js` ) ,
39
39
] ) ;
40
40
} catch ( err ) {
41
41
console . error ( err ) ;
You can’t perform that action at this time.
0 commit comments