aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Handler/ErrorPages.pm
diff options
context:
space:
mode:
authorDarkelarious <darkelarious@333networks.com>2022-08-07 17:58:59 +0200
committerDarkelarious <darkelarious@333networks.com>2022-08-07 17:58:59 +0200
commit1ca9cdc52f3b63c8bf5e4550bbb922608beb437f (patch)
tree90802c7f7800c1b9d2d5d22f0e6b41b373ec39b9 /lib/MasterWebInterface/Handler/ErrorPages.pm
parente9b4cd5fc79ca2d044eba4fed8bf62b138f44249 (diff)
downloadWebInterface-Perl-1ca9cdc52f3b63c8bf5e4550bbb922608beb437f.tar.gz
WebInterface-Perl-1ca9cdc52f3b63c8bf5e4550bbb922608beb437f.zip
fixes in Json API
Diffstat (limited to 'lib/MasterWebInterface/Handler/ErrorPages.pm')
-rwxr-xr-xlib/MasterWebInterface/Handler/ErrorPages.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/MasterWebInterface/Handler/ErrorPages.pm b/lib/MasterWebInterface/Handler/ErrorPages.pm
index 8c0b5e9..ccf5555 100755
--- a/lib/MasterWebInterface/Handler/ErrorPages.pm
+++ b/lib/MasterWebInterface/Handler/ErrorPages.pm
@@ -21,7 +21,8 @@ sub handle404
# json error status separately
if ( $self->reqPath() =~ m/^\/json/ig)
{
- $self->resHeader("Content-Type", "application/json; charset=UTF-8");
+ # response as json data
+ $self->resHeader("Access-Control-Allow-Origin", "*");
$self->resJSON({
error => 1,
in => "url_format"
@@ -59,7 +60,8 @@ sub handle500
# json error status separately
if ( $self->reqPath() =~ m/^\/json/ig)
{
- $self->resHeader("Content-Type", "application/json; charset=UTF-8");
+ # response as json data
+ $self->resHeader("Access-Control-Allow-Origin", "*");
$self->resJSON({
error => 1,
in => "internal_error",