Skip to content

Commit

Permalink
Improve CORS headers, make etag readable through XHR requests #483
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertware committed Jun 24, 2023
1 parent 7634fb3 commit 8eb2d8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/output/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class Json extends Printer
public function printHeader()
{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');
header('Access-Control-Expose-Headers: *');
header('Content-Type: application/json;charset=UTF-8');
}

Expand Down
2 changes: 2 additions & 0 deletions src/api/output/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Xml extends Printer
public function printHeader()
{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');
header('Access-Control-Expose-Headers: *');
header('Content-Type: application/xml;charset=UTF-8');
}

Expand Down

0 comments on commit 8eb2d8c

Please sign in to comment.