aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2018-12-09 21:08:59 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2018-12-09 21:08:59 -0800
commit2a8844ce2c1ebe0f206ea366120eea3734a9cbd3 (patch)
tree9bce01b2313063b837437f5513d01487d64e7b6a /php/admin/index.php
parentAdd sentry.pl with config moved to its own file (diff)
downloadbouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.tar.gz
bouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.tar.bz2
bouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.zip
Avoid HTTP downgrades
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'php/admin/index.php')
-rw-r--r--php/admin/index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/php/admin/index.php b/php/admin/index.php
index 1e08189..e058900 100644
--- a/php/admin/index.php
+++ b/php/admin/index.php
@@ -11,7 +11,7 @@ require_once('../cfg/init.php');
if (!empty($_POST['add-submit'])) {
if (Mirror::insert_mirror($_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
set_msg('Mirror added successfully.');
- header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
+ header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
exit;
} else {
set_error('Mirror could not be added because of an unknown error.');
@@ -26,7 +26,7 @@ if (!empty($_POST['submit'])) {
if (!empty($_POST['doit'])) {
if (Mirror::update_mirror($_POST['mirror_id'],$_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
set_msg('Mirror updated successfully.');
- header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
+ header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
exit;
} else {
set_error('Mirror update failed.');