To make it easier to get information about tangled repos, CORS need to be enabled on repo knots otherwise browsers will throw a fit. This change adds those headers. I think maybe the auth routes could do without them as right now it just gives it to all the routes.
knotserver/middleware.go
knotserver/middleware.go
This file has not been changed.
knotserver/router.go
knotserver/router.go
This file has not been changed.
History
3 rounds
4 comments
nekomimi.pet
submitted
#2
2 commits
expand
collapse
59a1308e
knotserver: add cors headers as a middleware function
Signed-off-by: @nekomimi.pet <ana@nekoimimi.pet>
b19de89d
knotserver: have top level router use cors header function
Signed-off-by: @nekomimi.pet <ana@nekoimimi.pet>
nekomimi.pet
submitted
#1
2 commits
expand
collapse
83963a3d
knotserver/middleware.go: add cors headers as a middleware function
Signed-off-by: @nekomimi.pet <ana@nekoimimi.pet>
729f7fce
knotserver/router.go: have top level router use cors header function
Signed-off-by: @nekomimi.pet <ana@nekoimimi.pet>
expand 2 comments
resubmitted to sign off on commits
Awesome, this looks great! Tiny nit about the commits: they can simply be knotserver: โฆ (exclude the filename, we only specify nested directories).
nekomimi.pet
submitted
#0
2 commits
expand
collapse
88684a67
knotserver/middleware.go: add cors headers as a middleware function
396baab5
knotserver/router.go: have top level router use cors header function
renamed commits