Escape wildcard in paths

Both serviceworker.js and manifest.json load even if the '.' character is replaced by any other character. This regex fix will prevent that.
This commit is contained in:
Sahil Nirkhe
2020-06-22 21:57:09 +05:30
committed by GitHub
parent 0d4488a0c5
commit 991a6ee8c2

View File

@@ -4,7 +4,7 @@ from .views import manifest, service_worker, offline
# Serve up serviceworker.js and manifest.json at the root # Serve up serviceworker.js and manifest.json at the root
urlpatterns = [ urlpatterns = [
url('^serviceworker.js$', service_worker, name='serviceworker'), url(r'^serviceworker\.js$', service_worker, name='serviceworker'),
url('^manifest.json$', manifest, name='manifest'), url(r'^manifest\.json$', manifest, name='manifest'),
url('^offline/$', offline, name='offline') url('^offline/$', offline, name='offline')
] ]