summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-23 22:56:16 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-23 23:04:10 +0200
commit32bf4cb0c949f44343849607d0439a61d1e6ea49 (patch)
treee9ff143800a277aa8ecb99f890e00d3e843f14b0 /main.go
parent3cdf92cf07607d60b266e2a458f503af753020f3 (diff)
Add API KEY support to allow CORS requests.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index eeb4036..44dda71 100644
--- a/main.go
+++ b/main.go
@@ -12,8 +12,8 @@ import (
"github.com/codegangsta/cli"
"github.com/iotbzh/xds-agent/lib/agent"
"github.com/iotbzh/xds-agent/lib/syncthing"
+ "github.com/iotbzh/xds-agent/lib/webserver"
"github.com/iotbzh/xds-agent/lib/xdsconfig"
- "github.com/iotbzh/xds-agent/lib/xdsserver"
)
const (
@@ -87,7 +87,7 @@ func xdsAgent(cliCtx *cli.Context) error {
ctx.Log.Infof("Local Syncthing ID: %s", id)
// Create and start Web Server
- ctx.WWWServer = xdsserver.NewServer(ctx.Config, ctx.Log)
+ ctx.WWWServer = webserver.New(ctx.Config, ctx.Log)
if err = ctx.WWWServer.Serve(); err != nil {
log.Println(err)
return cli.NewExitError(err, 3)