{"action":"created","issue":{"url":"https://api.github.com/repos/75lb/local-web-server/issues/20","labels_url":"https://api.github.com/repos/75lb/local-web-server/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/75lb/local-web-server/issues/20/comments","events_url":"https://api.github.com/repos/75lb/local-web-server/issues/20/events","html_url":"https://github.com/75lb/local-web-server/issues/20","id":114534562,"number":20,"title":"How can I add rewrite-rules?","user":{"login":"markusbrunner-design","id":922843,"avatar_url":"https://avatars.githubusercontent.com/u/922843?v=3","gravatar_id":"","url":"https://api.github.com/users/markusbrunner-design","html_url":"https://github.com/markusbrunner-design","followers_url":"https://api.github.com/users/markusbrunner-design/followers","following_url":"https://api.github.com/users/markusbrunner-design/following{/other_user}","gists_url":"https://api.github.com/users/markusbrunner-design/gists{/gist_id}","starred_url":"https://api.github.com/users/markusbrunner-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusbrunner-design/subscriptions","organizations_url":"https://api.github.com/users/markusbrunner-design/orgs","repos_url":"https://api.github.com/users/markusbrunner-design/repos","events_url":"https://api.github.com/users/markusbrunner-design/events{/privacy}","received_events_url":"https://api.github.com/users/markusbrunner-design/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/75lb/local-web-server/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/75lb/local-web-server/milestones/3","html_url":"https://github.com/75lb/local-web-server/milestones/v1.0.0","labels_url":"https://api.github.com/repos/75lb/local-web-server/milestones/3/labels","id":1410236,"number":3,"title":"v1.0.0","description":"- rewritten in koa 2\r\n- full test suite\r\n","creator":{"login":"75lb","id":1247980,"avatar_url":"https://avatars.githubusercontent.com/u/1247980?v=3","gravatar_id":"","url":"https://api.github.com/users/75lb","html_url":"https://github.com/75lb","followers_url":"https://api.github.com/users/75lb/followers","following_url":"https://api.github.com/users/75lb/following{/other_user}","gists_url":"https://api.github.com/users/75lb/gists{/gist_id}","starred_url":"https://api.github.com/users/75lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/75lb/subscriptions","organizations_url":"https://api.github.com/users/75lb/orgs","repos_url":"https://api.github.com/users/75lb/repos","events_url":"https://api.github.com/users/75lb/events{/privacy}","received_events_url":"https://api.github.com/users/75lb/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-11-13T12:09:06Z","updated_at":"2015-11-18T10:41:33Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-11-02T06:29:21Z","updated_at":"2015-11-19T12:29:58Z","closed_at":null,"body":"Like in the npm-server \"web-server-rewrite\" I really need http-rewrite-rules with regular expressions. But:\r\n1. I really like your local-web-server\r\n2. I can't get the web-server-rewrite to work because of problems with the execSync-Dependency\r\n\r\nWhat for is this? It's especially for services which need to be rewritten to another url in local and live-environment, e.g.:\r\n\r\n rewrites\r\n```\r\n {\r\n    \"localhost\": {\r\n      \"(.*)(/users/)(.*)\": \"http://myserver1.mw.domain.lan:10080/middleware1/$3\",\r\n      \"(.*)(/auth/)(.*)\": \"http://myserver2.mw.domain.lan:10080/auth-service/$3\"\r\n    },\r\n   \"domain.de\": {\r\n    ...\r\n   }\r\n }\r\n```\r\nThis would be very helpful - and if you include the keyword \"rewrite\" in your descriptions, this would definitely boost your server-implementation!\r\n\r\nRegards\r\nMarkus"},"comment":{"url":"https://api.github.com/repos/75lb/local-web-server/issues/comments/158044121","html_url":"https://github.com/75lb/local-web-server/issues/20#issuecomment-158044121","issue_url":"https://api.github.com/repos/75lb/local-web-server/issues/20","id":158044121,"user":{"login":"markusbrunner-design","id":922843,"avatar_url":"https://avatars.githubusercontent.com/u/922843?v=3","gravatar_id":"","url":"https://api.github.com/users/markusbrunner-design","html_url":"https://github.com/markusbrunner-design","followers_url":"https://api.github.com/users/markusbrunner-design/followers","following_url":"https://api.github.com/users/markusbrunner-design/following{/other_user}","gists_url":"https://api.github.com/users/markusbrunner-design/gists{/gist_id}","starred_url":"https://api.github.com/users/markusbrunner-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusbrunner-design/subscriptions","organizations_url":"https://api.github.com/users/markusbrunner-design/orgs","repos_url":"https://api.github.com/users/markusbrunner-design/repos","events_url":"https://api.github.com/users/markusbrunner-design/events{/privacy}","received_events_url":"https://api.github.com/users/markusbrunner-design/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T12:29:58Z","updated_at":"2015-11-19T12:29:58Z","body":"Hey,\r\n\r\nat first I wanna thank you for implementing this issue - that's really cool!\r\n\r\nUnfortunately the current \"configuration\" isn't working for me, because I need port-numbers in my rewrite-rule:\r\n=> \"http://my.server.lan:10080/myservice/$1\"\r\nbut they are used via \":\" for constants?\r\n\r\nRegards\r\nMarkus\r\n"}}