From e03cdd99727e3d939854207cfb6109641c2394e4 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Wed, 27 Nov 2019 12:40:23 +0100 Subject: [PATCH] Add default .htacess to prevent JSON files caching --- angular.json | 1 + src/.htaccess | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/.htaccess diff --git a/angular.json b/angular.json index 4036b3bce..b0c7a547d 100644 --- a/angular.json +++ b/angular.json @@ -20,6 +20,7 @@ "src/assets", "src/locale", "src/favicon.ico", + "src/.htaccess", { "glob": "**/*.json", "input": "src/", "output": "/" }, { "glob": "**/*.md", "input": "src/", "output": "/" }, { "glob": "**/*.png", "input": "src/", "output": "/" } diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 000000000..34b87a8bc --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,9 @@ +<filesMatch "\.json$"> + FileETag None + <ifModule mod_headers.c> + Header unset ETag + Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" + Header set Pragma "no-cache" + Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" + </ifModule> +</filesMatch> -- GitLab