{"action":"closed","issue":{"url":"https://api.github.com/repos/labstack/echo/issues/720","repository_url":"https://api.github.com/repos/labstack/echo","labels_url":"https://api.github.com/repos/labstack/echo/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/labstack/echo/issues/720/comments","events_url":"https://api.github.com/repos/labstack/echo/issues/720/events","html_url":"https://github.com/labstack/echo/issues/720","id":188938593,"number":720,"title":"Swagger UI not working","user":{"login":"atbaig","id":6598529,"avatar_url":"https://avatars.githubusercontent.com/u/6598529?v=3","gravatar_id":"","url":"https://api.github.com/users/atbaig","html_url":"https://github.com/atbaig","followers_url":"https://api.github.com/users/atbaig/followers","following_url":"https://api.github.com/users/atbaig/following{/other_user}","gists_url":"https://api.github.com/users/atbaig/gists{/gist_id}","starred_url":"https://api.github.com/users/atbaig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atbaig/subscriptions","organizations_url":"https://api.github.com/users/atbaig/orgs","repos_url":"https://api.github.com/users/atbaig/repos","events_url":"https://api.github.com/users/atbaig/events{/privacy}","received_events_url":"https://api.github.com/users/atbaig/received_events","type":"User","site_admin":false},"labels":[{"id":182096620,"url":"https://api.github.com/repos/labstack/echo/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"vishr","id":314036,"avatar_url":"https://avatars.githubusercontent.com/u/314036?v=3","gravatar_id":"","url":"https://api.github.com/users/vishr","html_url":"https://github.com/vishr","followers_url":"https://api.github.com/users/vishr/followers","following_url":"https://api.github.com/users/vishr/following{/other_user}","gists_url":"https://api.github.com/users/vishr/gists{/gist_id}","starred_url":"https://api.github.com/users/vishr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishr/subscriptions","organizations_url":"https://api.github.com/users/vishr/orgs","repos_url":"https://api.github.com/users/vishr/repos","events_url":"https://api.github.com/users/vishr/events{/privacy}","received_events_url":"https://api.github.com/users/vishr/received_events","type":"User","site_admin":false},"assignees":[{"login":"vishr","id":314036,"avatar_url":"https://avatars.githubusercontent.com/u/314036?v=3","gravatar_id":"","url":"https://api.github.com/users/vishr","html_url":"https://github.com/vishr","followers_url":"https://api.github.com/users/vishr/followers","following_url":"https://api.github.com/users/vishr/following{/other_user}","gists_url":"https://api.github.com/users/vishr/gists{/gist_id}","starred_url":"https://api.github.com/users/vishr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishr/subscriptions","organizations_url":"https://api.github.com/users/vishr/orgs","repos_url":"https://api.github.com/users/vishr/repos","events_url":"https://api.github.com/users/vishr/events{/privacy}","received_events_url":"https://api.github.com/users/vishr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-11-12T22:28:29Z","updated_at":"2016-11-13T01:13:24Z","closed_at":"2016-11-13T01:13:24Z","body":"### Description\r\n I love the simplicity of labstack. I am trying to use it. I am having some challenges in getting the swagger ui working. Could you please take a quick look at help\r\n\r\nHere is my server: http://54.201.137.59/apispec/\r\nHere is the json am serving: http://54.201.137.59/nutoken/swagger.json\r\n\r\nHere is the code I have. I tried several combinations. still no help.\r\n\r\nfunc main() {\r\n        CONFIG := flag.String(\"config\", \"\", \"This is the configuration file\")\r\n        flag.Parse()\r\n        Config = New(*CONFIG)\r\n        Config.SoftKey, _ = hex.DecodeString(\"2b7e151628aed2a6abf7158809cf4f3c\")\r\n\r\n        e := echo.New()\r\n        e.Use(middleware.Logger())\r\n        e.Use(middleware.Recover())\r\n        e.Use(middleware.CORS())\r\n        /*e.Use(middleware.CORSWithConfig(middleware.CORSConfig{\r\n                AllowOrigins: []string{\"*\"},\r\n                AllowMethods: []string{\"*\"},\r\n                //AllowMethods: []string{echo.GET, echo.HEAD, echo.PUT, echo.PATCH, echo.POST, echo.DELETE, echo.OPTIONS},\r\n                //ExposeHeaders: []string{\"X-My-Header\"},\r\n                ExposeHeaders: []string{\"*\"},\r\n                //AllowHeaders:  []string{\"Content-Type\", \"Version\", \"Accept\"},\r\n                AllowHeaders: []string{\"*\"},\r\n        }))\r\n        */\r\n        e.Static(\"/nutoken/swagger.json\", \"./dist/swagger.json\")\r\n        e.Static(\"/apispec\", \"./dist/\")\r\n\r\n### Checklist\r\n\r\n- [ ] Dependencies installed\r\nswaggerui 2.2.5\r\n- [ ] No typos\r\n- [ ] Searched existing issues and docs\r\n\r\n### Expected behaviour\r\nI should see the swagger ui\r\n### Actual behaviour\r\nI am getting Can't read from server. It may not have the appropriate access-control-origin settings.\r\n### Steps to reproduce\r\nPlease see links above\r\n### Working code to debug\r\nPlease see code snippet\r\nfunc main() {\r\n        CONFIG := flag.String(\"config\", \"\", \"This is the configuration file\")\r\n        flag.Parse()\r\n        Config = New(*CONFIG)\r\n        Config.SoftKey, _ = hex.DecodeString(\"2b7e151628aed2a6abf7158809cf4f3c\")\r\n\r\n        e := echo.New()\r\n        e.Use(middleware.Logger())\r\n        e.Use(middleware.Recover())\r\n        e.Use(middleware.CORS())\r\n        /*e.Use(middleware.CORSWithConfig(middleware.CORSConfig{\r\n                AllowOrigins: []string{\"*\"},\r\n                AllowMethods: []string{\"*\"},\r\n                //AllowMethods: []string{echo.GET, echo.HEAD, echo.PUT, echo.PATCH, echo.POST, echo.DELETE, echo.OPTIONS},\r\n                //ExposeHeaders: []string{\"X-My-Header\"},\r\n                ExposeHeaders: []string{\"*\"},\r\n                //AllowHeaders:  []string{\"Content-Type\", \"Version\", \"Accept\"},\r\n                AllowHeaders: []string{\"*\"},\r\n        }))\r\n        */\r\n        e.Static(\"/nutoken/swagger.json\", \"./dist/swagger.json\")\r\n        e.Static(\"/apispec\", \"./dist/\")\r\n\r\n### Version/commit\r\n"}}
{"actor":{"display_login":"vishr"}}