From 4239044c548c977809b36445318c5ae51a3c4c62 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 7 Aug 2013 11:15:55 +0200 Subject: [PATCH] Allow access from all domains (not really secure) --- src/rest/response.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rest/response.lua b/src/rest/response.lua index 938ac28..4e7b8cf 100644 --- a/src/rest/response.lua +++ b/src/rest/response.lua @@ -82,7 +82,9 @@ end function M:send() io.write("Status: " .. self.httpStatusCode .. " " .. self.httpStatusText .. "\r\n") - io.write ("Content-type: " .. self.contentType .. "\r\n\r\n") + io.write("Content-type: " .. self.contentType .. "\r\n") + io.write("Access-Control-Allow-Origin: *\r\n\r\n") + print(self:serializeAsJson()) end