Skip to content

Commit

Permalink
use NE flag for RewriteRule
Browse files Browse the repository at this point in the history
  • Loading branch information
winniehell committed Oct 21, 2016
1 parent 95d8bd7 commit fbd343f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 40 deletions.
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-apache22.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

# needed for downloading attachments
DocumentRoot /home/git/gitlab/public
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-apache24.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

# needed for downloading attachments
DocumentRoot /home/git/gitlab/public
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-omnibus-apache22.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

# needed for downloading attachments
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-omnibus-apache24.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

# needed for downloading attachments
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-omnibus-ssl-apache22.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-omnibus-ssl-apache24.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-ssl-apache22.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
Expand Down
6 changes: 1 addition & 5 deletions web-server/apache/gitlab-ssl-apache24.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Don't escape encoded characters in api requests
RewriteCond %{REQUEST_URI} ^/api/v3/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
Expand Down

0 comments on commit fbd343f

Please sign in to comment.