[bugzilla-gnome-org-upstream] Re-introduce the htaccess file on the test Bugzilla instance
- From: Andrea Veri <av src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-upstream] Re-introduce the htaccess file on the test Bugzilla instance
- Date: Mon, 4 May 2015 22:45:05 +0000 (UTC)
commit 794f1b1ef57243fcc8bee677f13e006b50599073
Author: Andrea Veri <av gnome org>
Date: Tue May 5 00:44:55 2015 +0200
Re-introduce the htaccess file on the test Bugzilla instance
.gitignore | 1 -
.htaccess | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fad14c1..62d139a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-.htaccess
/lib/*
/template/en/custom
/docs/bugzilla.ent
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..8f40e96
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,49 @@
+# Don't allow people to retrieve non-cgi executable files or our private data
+<FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*|cpanfile)$>
+ <IfModule mod_version.c>
+ <IfVersion < 2.4>
+ Deny from all
+ </IfVersion>
+ <IfVersion >= 2.4>
+ <IfModule mod_perl.c>
+ Deny from all
+ </IfModule>
+ <IfModule !mod_perl.c>
+ Require all denied
+ </IfModule>
+ </IfVersion>
+ </IfModule>
+ <IfModule !mod_version.c>
+ Deny from all
+ </IfModule>
+</FilesMatch>
+
+Options -Indexes
+
+<IfModule mod_expires.c>
+<IfModule mod_headers.c>
+<IfModule mod_env.c>
+ <FilesMatch (\.js|\.css)$>
+ ExpiresActive On
+ # According to RFC 2616, "1 year in the future" means "never expire".
+ # We change the name of the file's URL whenever its modification date
+ # changes, so browsers can cache any individual JS or CSS URL forever.
+ # However, since all JS and CSS URLs involve a ? in them (for the changing
+ # name) we have to explicitly set an Expires header or browsers won't
+ # *ever* cache them.
+ ExpiresDefault "now plus 1 years"
+ Header append Cache-Control "public"
+ </FilesMatch>
+
+ # This lets Bugzilla know that we are properly sending Cache-Control
+ # and Expires headers for CSS and JS files.
+ SetEnv BZ_CACHE_CONTROL 1
+</IfModule>
+</IfModule>
+</IfModule>
+
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteOptions inherit
+ RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE]
+</IfModule>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]