Add cors
Change-Id: Ifa47ed402f124fb13fd9c02ec7500a4396b1d7bc
diff --git a/service.go b/service.go
index 2c341d2..3230b10 100644
--- a/service.go
+++ b/service.go
@@ -19,6 +19,11 @@
docID := c.Param("doc_id")
textID := c.Param("text_id")
+ /*
+ c.Header("Access-Control-Allow-Origin", "null")
+ c.Header("Access-Control-Allow-Credentials", "null")
+ c.Header("Vary", "Origin")*/
+
err := db.View(func(txn *badger.Txn) error {
item, err := txn.Get([]byte(corpusID + "/" + docID + "/" + textID))
@@ -75,6 +80,11 @@
//
r.GET("/", func(c *gin.Context) {
+ /*
+ c.Header("Access-Control-Allow-Origin", "null")
+ c.Header("Access-Control-Allow-Credentials", "null")
+ c.Header("Vary", "Origin")
+ */
c.HTML(http.StatusOK, "main.html", gin.H{
"korapServer": "https://korap.ids-mannheim.de/instance/test",
})