Freeze break request: https->http forward fix on kojipkgs

Patrick Uiterwijk puiterwijk at redhat.com
Mon Sep 8 22:06:20 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

I would like to request +1's for the following patch.
This solves ticket #4507 (https://fedorahosted.org/fedora-infrastructure/ticket/4507).


- From a276feb1f5e1001d7df343ea00b120289b0a1539 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk at redhat.com>
Date: Mon, 8 Sep 2014 22:01:34 +0000
Subject: [PATCH] Manually do the forward if trailing slash is excluded

- ---
 configs/web/applications/kojipkgs.conf |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configs/web/applications/kojipkgs.conf b/configs/web/applications/kojipkgs.conf
index be0e03e..9cb883f 100644
- --- a/configs/web/applications/kojipkgs.conf
+++ b/configs/web/applications/kojipkgs.conf
@@ -1,6 +1,14 @@
 CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/kojipkgs02.fedoraproject.org-access.log.%Y-%m-%d 86400" combined
 ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/kojipkgs02.fedoraproject.org-error.log.%Y-%m-%d 86400"

+# Let's forward to a URL including trailing slash manually
+# The URLs generated by the DirectorySlash option use http because squid does https termination
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_URI} !(.*)/$
+RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/ [R=301,L]
+
+
 Alias /packages /mnt/fedora_koji/koji/packages
 Alias /toplink/packages /mnt/fedora_koji/koji/packages

- -- 
1.7.2.1


- -- 
With kind regards,
Patrick Uiterwijk
Associate Software Engineer, Red Hat
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJUDihcAAoJEIZXmA2atR5QSH4P/A2Ka6G7i/TND4Qw/NM20kvT
mFmUFEn37xFyTpwzM1qtuy87VelVwsmytqFY8/OYxa5ZMn0QfszAVQTQS745rqYA
J7tSkbVt8pZjLGAzVCZr5pjQkKmm9Olr4n97WFJJLL7pFjbkvGmaAxSMEob4sUiK
k5AbPWyqytYmpgxLym+3wbNvq6iwgeCMO6EfD+rzZL6m7tgmo+3hyxvjMX+ImJFQ
6bIPgh8rfRxbmXmo6mrhlmEAoqOi1NmJlGW1QJFLh/yzud6St8khFePCPWB7lhlj
YZYoGgl3hOPuzBPmy7iBtKFgT6ZQGjVjSYnaN0FXKcc3HXs6m/FPh1hpbi4SgZh9
KOlWADZxdp68V4cJ47kZ1NxbR4T7dNKbFKFhgusUz5/4hRHRfeb692ZVkFLYMcjF
rUULuFK85CC9ZnLctEp2ncnNRE5H4Z+VunlMPdIusNSBN6Tfud0Gn00reYl10e67
0dqSNcfBYx5w4x1UROZEURnjS0BnFeFucaqxyViB0gmcvL/eO1NSvCdru4rOz6YB
YDaPsuYlg1F1CWq3rj4trLwbB3YONSyEw98zgSqwolxBO8PlZcwd3tM2Js8PPnFG
3cj7WLfdX8a/8Ap/uhBzKyiGRzZGqe1DA2YQ/BbEH0lKC6lZTFtms8OvCpKlpyeU
yr2rIMAmBBtI25RXX+BL
=hNNG
-----END PGP SIGNATURE-----


More information about the infrastructure mailing list