Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
21d89a4f
Commit
21d89a4f
authored
Oct 22, 2018
by
Sietse Ringers
Browse files
Add cors
parent
d8d5ecb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/irmaserver/server.go
View file @
21d89a4f
...
...
@@ -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/"
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment