From 004f4efcfd0779f4307b90fed139dc87d01ad0b9 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sat, 26 Mar 2016 03:48:12 +0100 Subject: NMS: Various performance tweaks --- include/nms/web.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/nms') diff --git a/include/nms/web.pm b/include/nms/web.pm index c9f7236..889e774 100755 --- a/include/nms/web.pm +++ b/include/nms/web.pm @@ -57,7 +57,7 @@ sub db_safe_quote { # endpoints it is better to return no data than old data (e.g.: ping). sub setwhen { $now = "now()"; - my $window = '15m'; + my $window = '8m'; my $offset = '0s'; if (@_ > 0) { $window = $_[0]; @@ -86,6 +86,8 @@ sub finalize_output { printcc; print "Etag: $hash\n"; + print "Access-Control-Allow-Origin: *\n"; + print "Access-Control-Allow-Methods: HEAD, GET\n"; print "Content-Type: text/json; charset=utf-8\n\n"; print JSON::XS::encode_json(\%json); print "\n"; -- cgit v1.2.3