Adding battletag saving, settings in user repo, cors, help now reffers to website

This commit is contained in:
Runebaas 2017-10-04 01:35:25 +02:00
parent ef6fd15116
commit 0c9a2a5619
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
6 changed files with 149 additions and 22 deletions

View file

@ -0,0 +1,22 @@
using Nancy;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
namespace Geekbot.net.WebApi
{
public class WebConfig : DefaultNancyBootstrapper
{
protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context)
{
//CORS Enable
pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) =>
{
ctx.Response.WithHeader("Access-Control-Allow-Origin", "*")
.WithHeader("Access-Control-Allow-Methods", "POST,GET")
.WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type");
});
}
}
}