Commit 21d89a4f authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Add cors

parent d8d5ecb2
......@@ -8,6 +8,7 @@ import (
"github.com/dgrijalva/jwt-go"
"github.com/go-chi/chi"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/rs/cors"
"github.com/privacybydesign/irmago"
"github.com/privacybydesign/irmago/server"
"github.com/privacybydesign/irmago/server/irmarequestor"
......@@ -52,6 +53,11 @@ func Handler(config *Configuration) (http.Handler, error) {
router := chi.NewRouter()
router.Use(cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type"},
}).Handler)
// Mount server for irmaclient
router.Mount("/irma/", irmarequestor.HttpHandlerFunc("/irma/"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment