iris icon indicating copy to clipboard operation
iris copied to clipboard

Access-Control-Allow-Origin

Open charlesduarte019 opened this issue 9 years ago • 2 comments

How can i configure the hearders?

charlesduarte019 avatar Jul 27 '17 15:07 charlesduarte019

func(ctx context.Context){
   /* 
   ctx.ResponseWriter() // gives you the http.ResponseWriter
   ctx.Request() // gives you the *http.Request
   to set a header you use the response writer or the ctx.Header("key", "value")
   to get a request header you use the request or the ctx.GetHeader("key")
  */
   ctx.Header("Access-Control-Allow-Origin", "*")
}

Examples could be found here.

hiveminded avatar Jul 27 '17 15:07 hiveminded

Thank you

charlesduarte019 avatar Jul 27 '17 16:07 charlesduarte019