mirror of
https://github.com/pablouser1/ProxiTok.git
synced 2024-12-06 19:27:30 +01:00
Heroku using nginx, reverted public and some fixes
This commit is contained in:
@@ -11,19 +11,26 @@ class SettingsController {
|
||||
$latte->render(Misc::getView('settings'), new SettingsTemplate);
|
||||
}
|
||||
|
||||
static private function redirect() {
|
||||
$url = Misc::url('/settings');
|
||||
header("Location: {$url}");
|
||||
}
|
||||
|
||||
static public function proxy() {
|
||||
if (in_array(Cookies::PROXY, $_POST)) {
|
||||
foreach (Cookies::PROXY as $proxy_element) {
|
||||
Cookies::set($proxy_element, $_POST[$proxy_element]);
|
||||
}
|
||||
}
|
||||
$url = Misc::url('/settings');
|
||||
header("Location: {$url}");
|
||||
self::redirect();
|
||||
}
|
||||
|
||||
static public function api() {
|
||||
$_POST['legacy'] ?? Cookies::set('api-legacy', '1');
|
||||
$url = Misc::url('/settings');
|
||||
header("Location: {$url}");
|
||||
$legacy = 'off';
|
||||
if (isset($_POST['api-legacy'])) {
|
||||
$legacy = 'on';
|
||||
}
|
||||
Cookies::set('api-legacy', $legacy);
|
||||
self::redirect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user