{"action":"created","issue":{"url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/111","repository_url":"https://api.github.com/repos/chimurai/http-proxy-middleware","labels_url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/111/comments","events_url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/111/events","html_url":"https://github.com/chimurai/http-proxy-middleware/issues/111","id":176646666,"number":111,"title":"Proxing to local https server with self signed cert","user":{"login":"kotfilemon","id":10028517,"avatar_url":"https://avatars.githubusercontent.com/u/10028517?v=3","gravatar_id":"","url":"https://api.github.com/users/kotfilemon","html_url":"https://github.com/kotfilemon","followers_url":"https://api.github.com/users/kotfilemon/followers","following_url":"https://api.github.com/users/kotfilemon/following{/other_user}","gists_url":"https://api.github.com/users/kotfilemon/gists{/gist_id}","starred_url":"https://api.github.com/users/kotfilemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kotfilemon/subscriptions","organizations_url":"https://api.github.com/users/kotfilemon/orgs","repos_url":"https://api.github.com/users/kotfilemon/repos","events_url":"https://api.github.com/users/kotfilemon/events{/privacy}","received_events_url":"https://api.github.com/users/kotfilemon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-13T13:54:01Z","updated_at":"2016-09-13T14:24:22Z","closed_at":null,"body":"### Expected behavior\r\n\r\njust proxing requests to the api.\r\n\r\n### Actual behavior\r\n\r\nI get 404 response when insecure proxy is set to the existing resource\r\n\r\n### Setup\r\n\r\n* http-proxy-middleware: 0.9.1\r\n* server: browser-sync: 2.15.0\r\n\r\n#### proxy middleware configuration\r\n```javascript\r\nvar proxyMiddleware = require('http-proxy-middleware');\r\nvar proxyURL = 'https://portal.dev'; //this is my dev env, running on docker\r\nvar authProxy = proxyMiddleware('/rest', {target: proxyURL, secure: false, logLevel: 'debug'});\r\n```\r\n#### server mounting\r\n```javascript\r\nbrowserSync.init({\r\n              logLevel: \"debug\",\r\n              https: true, //also tried while it was set to false\r\n              server: {\r\n                  baseDir: outputDir,\r\n                  middleware: [authProxy]\r\n              }             \r\n          });\r\n```\r\n\r\n## the logs\r\n\r\n```\r\n[HPM] Context match: \"/rest\" -> \"/rest/version\"\r\n[HPM] Proxying \"/rest/version\": \"undefined\" -> \"https://portal.dev\"\r\n```\r\n\r\nthe chrome console log:\r\n\r\n```\r\nFailed to load resource: the server responded with a status of 404 (Not Found)\r\n```\r\n\r\nthe proxy itself setting is ok, if I change to: \r\n\r\n```\r\nvar authProxy = proxyMiddleware('/rest', {target: proxyURL, secure: true, logLevel: 'debug'});\r\n```\r\n\r\nthen I get different error which is expected:\r\n\r\n```\r\n[HPM] Context match: \"/rest\" -> \"/rest/version\"\r\n[HPM] Proxying \"/rest/version\": \"undefined\" -> \"https://portal.dev\"\r\n[HPM] Proxy error: SELF_SIGNED_CERT_IN_CHAIN. localhost:3000 -> \"portal.dev/rest/version\"\r\n```\r\n\r\njust to make sure it should work\r\n\r\n```\r\n$ curl https://portal.dev/rest/version --insecure\r\n{\"version\":\"82859f14\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/comments/246698164","html_url":"https://github.com/chimurai/http-proxy-middleware/issues/111#issuecomment-246698164","issue_url":"https://api.github.com/repos/chimurai/http-proxy-middleware/issues/111","id":246698164,"user":{"login":"chimurai","id":655241,"avatar_url":"https://avatars.githubusercontent.com/u/655241?v=3","gravatar_id":"","url":"https://api.github.com/users/chimurai","html_url":"https://github.com/chimurai","followers_url":"https://api.github.com/users/chimurai/followers","following_url":"https://api.github.com/users/chimurai/following{/other_user}","gists_url":"https://api.github.com/users/chimurai/gists{/gist_id}","starred_url":"https://api.github.com/users/chimurai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chimurai/subscriptions","organizations_url":"https://api.github.com/users/chimurai/orgs","repos_url":"https://api.github.com/users/chimurai/repos","events_url":"https://api.github.com/users/chimurai/events{/privacy}","received_events_url":"https://api.github.com/users/chimurai/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T14:24:22Z","updated_at":"2016-09-13T14:24:22Z","body":"Can you try again with the latest version of `http-proxy-middleware` (v0.17.1)?"}}
{"actor":{"display_login":"chimurai"}}