Adding battletag saving, settings in user repo, cors, help now reffers to website
This commit is contained in:
parent
ef6fd15116
commit
0c9a2a5619
6 changed files with 149 additions and 22 deletions
22
Geekbot.net/WebApi/WebConfig.cs
Normal file
22
Geekbot.net/WebApi/WebConfig.cs
Normal 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");
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue