{"action":"created","issue":{"url":"https://api.github.com/repos/indexzero/http-server/issues/347","repository_url":"https://api.github.com/repos/indexzero/http-server","labels_url":"https://api.github.com/repos/indexzero/http-server/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/indexzero/http-server/issues/347/comments","events_url":"https://api.github.com/repos/indexzero/http-server/issues/347/events","html_url":"https://github.com/indexzero/http-server/issues/347","id":211091401,"node_id":"MDU6SXNzdWUyMTEwOTE0MDE=","number":347,"title":"CORS option not working for me","user":{"login":"mnemanja","id":1423218,"node_id":"MDQ6VXNlcjE0MjMyMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1423218?v=4","gravatar_id":"","url":"https://api.github.com/users/mnemanja","html_url":"https://github.com/mnemanja","followers_url":"https://api.github.com/users/mnemanja/followers","following_url":"https://api.github.com/users/mnemanja/following{/other_user}","gists_url":"https://api.github.com/users/mnemanja/gists{/gist_id}","starred_url":"https://api.github.com/users/mnemanja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnemanja/subscriptions","organizations_url":"https://api.github.com/users/mnemanja/orgs","repos_url":"https://api.github.com/users/mnemanja/repos","events_url":"https://api.github.com/users/mnemanja/events{/privacy}","received_events_url":"https://api.github.com/users/mnemanja/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-03-01T14:09:00Z","updated_at":"2018-07-17T07:49:35Z","closed_at":"2017-03-02T13:50:33Z","author_association":"NONE","body":"From all the issues here and the documentation I've gathered it should be pretty easy.\r\n`http-server build/ -p 3010 --cors`\r\n\r\nHowever I'm not seeing any change in the Request headers.\r\n![image](https://cloud.githubusercontent.com/assets/1423218/23463136/cac10a38-fe90-11e6-83c9-78e379344271.png)\r\n\r\nThe console reports the following\r\n```\r\nFetch API cannot load PATH No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3010' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.\r\n```"},"comment":{"url":"https://api.github.com/repos/indexzero/http-server/issues/comments/405492270","html_url":"https://github.com/indexzero/http-server/issues/347#issuecomment-405492270","issue_url":"https://api.github.com/repos/indexzero/http-server/issues/347","id":405492270,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQ5MjI3MA==","user":{"login":"mnemanja","id":1423218,"node_id":"MDQ6VXNlcjE0MjMyMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1423218?v=4","gravatar_id":"","url":"https://api.github.com/users/mnemanja","html_url":"https://github.com/mnemanja","followers_url":"https://api.github.com/users/mnemanja/followers","following_url":"https://api.github.com/users/mnemanja/following{/other_user}","gists_url":"https://api.github.com/users/mnemanja/gists{/gist_id}","starred_url":"https://api.github.com/users/mnemanja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnemanja/subscriptions","organizations_url":"https://api.github.com/users/mnemanja/orgs","repos_url":"https://api.github.com/users/mnemanja/repos","events_url":"https://api.github.com/users/mnemanja/events{/privacy}","received_events_url":"https://api.github.com/users/mnemanja/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T07:49:35Z","updated_at":"2018-07-17T07:49:35Z","author_association":"NONE","body":"Hi @TeodorKolev,\r\nLike @derhuerst mentioned above, it was not about setting the server to send a cors request, but whether the destination point accepts it or not.\r\n\r\nWhen you make a request that request has to be accepted (whitelisted) on the server serving the endpoint in question.\r\n\r\nHope this helps."}}
{"actor":{"display_login":"mnemanja"}}