{"action":"opened","issue":{"url":"https://api.github.com/repos/axsuul/rails-reverse-proxy/issues/30","repository_url":"https://api.github.com/repos/axsuul/rails-reverse-proxy","labels_url":"https://api.github.com/repos/axsuul/rails-reverse-proxy/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/axsuul/rails-reverse-proxy/issues/30/comments","events_url":"https://api.github.com/repos/axsuul/rails-reverse-proxy/issues/30/events","html_url":"https://github.com/axsuul/rails-reverse-proxy/issues/30","id":351405491,"node_id":"MDU6SXNzdWUzNTE0MDU0OTE=","number":30,"title":"username and password don't seem to be respected","user":{"login":"dudo","id":2963800,"node_id":"MDQ6VXNlcjI5NjM4MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/2963800?v=4","gravatar_id":"","url":"https://api.github.com/users/dudo","html_url":"https://github.com/dudo","followers_url":"https://api.github.com/users/dudo/followers","following_url":"https://api.github.com/users/dudo/following{/other_user}","gists_url":"https://api.github.com/users/dudo/gists{/gist_id}","starred_url":"https://api.github.com/users/dudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dudo/subscriptions","organizations_url":"https://api.github.com/users/dudo/orgs","repos_url":"https://api.github.com/users/dudo/repos","events_url":"https://api.github.com/users/dudo/events{/privacy}","received_events_url":"https://api.github.com/users/dudo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-16T23:43:11Z","updated_at":"2018-08-16T23:43:11Z","closed_at":null,"author_association":"NONE","body":"This is my code... I'm still asked to login, though. Any idea?\r\n\r\n```\r\ndef _reverse_proxy(endpoint=nil)\r\n  @url = Settings.wordpress.url\r\n  @path ||= [endpoint, params[:path]].compact.join.gsub('//', '/')\r\n  reverse_proxy @url, options do |config|\r\n    config.on_missing do |code, response|\r\n      redirect_to root_url and return\r\n    end\r\n  end\r\nend\r\n\r\ndef options\r\n  source_request = URI(@url)\r\n  {\r\n    headers:    {\r\n      \"HOST\" => source_request.host,\r\n      \"X-Forwarded-Host\" => source_request.host,\r\n      \"X-Forwarded-Port\" => source_request.port.to_s,\r\n      \"X-Forwarded-Proto\" => source_request.scheme,\r\n    },\r\n    path: @path,\r\n    username: Settings.wordpress.username,\r\n    password: Settings.wordpress.password,\r\n    verify_ssl: Rails.env.production?\r\n  }.with_indifferent_access\r\nend\r\n```"}}
{"actor":{"display_login":"dudo"}}