aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Handler/ErrorPages.pm
diff options
context:
space:
mode:
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",