controllers: fix base url to omit scheme for when we connect through a https gateway
authorMichael Wallner <mike@php.net>
Fri, 16 Dec 2016 09:11:42 +0000 (10:11 +0100)
committerMichael Wallner <mike@php.net>
Fri, 20 Dec 2019 12:21:59 +0000 (13:21 +0100)
app/Controller/Github.php
app/Controller/Github/Callback.php

index 7b7bdf64d976547cee05bd7331439cfe6c102a5f..7ec309461ef60fd6ac20e59f5a9f7fb43bdaec32 100644 (file)
@@ -68,6 +68,7 @@ abstract class Github implements Controller
                        return true;
                }
                $this->app->redirect($this->app->getBaseUrl()->mod([
+                       "scheme" => null,
                        "path" => "github/signin",
                        "query" => new QueryString(["returnto" => $this->session->current])
                ]));
index fcd814f8995388ce93d663126794c1eb41107319..bd8c0e5abe6dc7f281aa894174f42bee95c194f0 100644 (file)
@@ -35,7 +35,7 @@ class Callback extends Github
                                $this->app->redirect($returnto);
                        } else {
                                $this->app->redirect(
-                                       $this->app->getBaseUrl()->mod("./github"));
+                                       $this->app->getBaseUrl()->mod(":./github"));
                        }
                }
                $this->app->display("github/callback");