Only report command errors to sentry and other minor tweaks

This commit is contained in:
Runebaas 2017-11-27 21:57:26 +01:00
parent fb169738fe
commit c4f10f3f7b
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
6 changed files with 44 additions and 15 deletions

View file

@ -1,4 +1,4 @@
using System;
using System.Diagnostics;
using Nancy;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
@ -11,13 +11,12 @@ namespace Geekbot.net.WebApi
{
//CORS Enable
pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) =>
pipelines.AfterRequest.AddItemToEndOfPipeline(ctx =>
{
ctx.Response.WithHeader("Access-Control-Allow-Origin", "*")
.WithHeader("Access-Control-Allow-Methods", "GET")
.WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type")
.WithHeader("Last-Modified", DateTime.Now.ToString());
.WithHeader("Last-Modified", Process.GetCurrentProcess().StartTime.ToString());
});
}
}