diff options
author | Stanimir Bozhilov <stanimir@audriga.com> | 2022-12-08 15:11:23 +0100 |
---|---|---|
committer | Stanimir Bozhilov <stanimir@audriga.com> | 2022-12-08 15:11:23 +0100 |
commit | b44befa8812a38ab29171480572f8581f3b970ad (patch) | |
tree | f222c32809d74102947d354ff01f4761cb42eb54 /lib/public/IRequest.php | |
parent | 46c10c77e1d5f1b46e665995f9030ccd74283af7 (diff) | |
download | nextcloud-server-b44befa8812a38ab29171480572f8581f3b970ad.tar.gz nextcloud-server-b44befa8812a38ab29171480572f8581f3b970ad.zip |
Move JSON content type regex to IRequest and make it a const
Diffstat (limited to 'lib/public/IRequest.php')
-rw-r--r-- | lib/public/IRequest.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index 7696c3fa8c3..26d0179bc2f 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -98,6 +98,11 @@ interface IRequest { public const USER_AGENT_THUNDERBIRD_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Thunderbird v.*$/'; /** + * @var string + */ + public const JSON_CONTENT_TYPE_REGEX = '{^application/(?:[a-z0-9.-]+\+)?json\b}'; + + /** * @param string $name * * @psalm-taint-source input |