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",
 		})
diff --git a/service_test.go b/service_test.go
index 936ec7e..eee7a79 100644
--- a/service_test.go
+++ b/service_test.go
@@ -39,11 +39,11 @@
 	router := setupRouter()
 
 	w := httptest.NewRecorder()
-	req, _ := http.NewRequest(http.MethodGet, "/index", nil)
+	req, _ := http.NewRequest(http.MethodGet, "/", nil)
 
 	router.ServeHTTP(w, req)
 
 	assert.Equal(t, http.StatusOK, w.Code)
-	assert.Contains(t, w.Body.String(), "data-server=\"https://korap.ids-mannheim.de/\"")
+	assert.Contains(t, w.Body.String(), "data-server=\"https://korap.ids-mannheim.de/instance/test\"")
 	assert.Contains(t, w.Body.String(), "<title>External Provider</title>")
 }