Open aacebedo opened 8 years ago
Looks like it is missing a call to the command:
bee generate docs
After doing that and adding this in the main.go file
beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
AllowOrigins: []string{"*"},
AllowHeaders: []string{"Origin"},
ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true,
}))
It seems to work. Documentation shall be updated !
Hi
I followed the tutorial found on the official website http://beego.me/docs/advantage/docs.md It does not seem to work, swagger saying CORS is not set. I have instantiated the project within a docker container so I am not using the localhost address.
The first thing is that the tutorial mentions port 8888 but by default, the port is now 8080.
Second the documentation mentions to add the line "ctx.Output.Header("Access-Control-Allow-Origin", "*")" but not in which file, I didn't found any reference to this variable anywhere in the project.
Any idea ?