mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 09:49:14 +02:00
Merge pull request #1277 from Zwyx/add-header
Add response header `X-Uncompressed-Content-Length` for JSON API
This commit is contained in:
commit
b75aee6834
1 changed files with 2 additions and 0 deletions
|
@ -151,6 +151,8 @@ class Controller
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
|
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
|
||||||
header('Access-Control-Allow-Headers: X-Requested-With, Content-Type');
|
header('Access-Control-Allow-Headers: X-Requested-With, Content-Type');
|
||||||
|
header('X-Uncompressed-Content-Length: ' . strlen($this->_json));
|
||||||
|
header('Access-Control-Expose-Headers: X-Uncompressed-Content-Length');
|
||||||
echo $this->_json;
|
echo $this->_json;
|
||||||
} else {
|
} else {
|
||||||
$this->_view();
|
$this->_view();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue