1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 10:55:56 +00:00

check if client-presented URL scheme is different from one configured in SELF_URL_PATH

This commit is contained in:
Andrew Dolgov
2021-02-26 14:14:44 +03:00
parent 4896874bda
commit e6a875b7e4
3 changed files with 30 additions and 8 deletions

View File

@@ -5,8 +5,9 @@ class Errors {
const E_UNKNOWN_METHOD = "E_UNKNOWN_METHOD";
const E_UNKNOWN_PLUGIN = "E_UNKNOWN_PLUGIN";
const E_SCHEMA_MISMATCH = "E_SCHEMA_MISMATCH";
const E_URL_SCHEME_MISMATCH = "E_URL_SCHEME_MISMATCH";
static function to_json(string $code) {
return json_encode(["error" => ["code" => $code]]);
static function to_json(string $code, array $params = []) {
return json_encode(["error" => ["code" => $code, "params" => $params]]);
}
}