pusher: add missing Content-Type header for json responses
This commit is contained in:
@@ -47,6 +47,7 @@ export class MapController extends BaseController {
|
||||
if (!match) {
|
||||
res.writeStatus("404 Not Found");
|
||||
this.addCorsHeaders(res);
|
||||
res.writeHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify({}));
|
||||
return;
|
||||
}
|
||||
@@ -55,6 +56,7 @@ export class MapController extends BaseController {
|
||||
|
||||
res.writeStatus("200 OK");
|
||||
this.addCorsHeaders(res);
|
||||
res.writeHeader('Content-Type', 'application/json');
|
||||
res.end(
|
||||
JSON.stringify({
|
||||
mapUrl,
|
||||
@@ -106,6 +108,7 @@ export class MapController extends BaseController {
|
||||
|
||||
res.writeStatus("200 OK");
|
||||
this.addCorsHeaders(res);
|
||||
res.writeHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify(mapDetails));
|
||||
} catch (e) {
|
||||
this.errorToResponse(e, res);
|
||||
|
||||
Reference in New Issue
Block a user