{"action":"created","issue":{"url":"https://api.github.com/repos/onelogin/python-saml/issues/81","labels_url":"https://api.github.com/repos/onelogin/python-saml/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/onelogin/python-saml/issues/81/comments","events_url":"https://api.github.com/repos/onelogin/python-saml/issues/81/events","html_url":"https://github.com/onelogin/python-saml/issues/81","id":102016696,"number":81,"title":"destination checking in response.py is weird for app running behind a proxy","user":{"login":"wfBeastie","id":3385821,"avatar_url":"https://avatars.githubusercontent.com/u/3385821?v=3","gravatar_id":"","url":"https://api.github.com/users/wfBeastie","html_url":"https://github.com/wfBeastie","followers_url":"https://api.github.com/users/wfBeastie/followers","following_url":"https://api.github.com/users/wfBeastie/following{/other_user}","gists_url":"https://api.github.com/users/wfBeastie/gists{/gist_id}","starred_url":"https://api.github.com/users/wfBeastie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wfBeastie/subscriptions","organizations_url":"https://api.github.com/users/wfBeastie/orgs","repos_url":"https://api.github.com/users/wfBeastie/repos","events_url":"https://api.github.com/users/wfBeastie/events{/privacy}","received_events_url":"https://api.github.com/users/wfBeastie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-19T22:47:39Z","updated_at":"2015-08-20T16:36:09Z","closed_at":null,"body":"Suppose I'm running a django app on localhost:8080 behind a proxy running on $(my ip address):443. My app is processing a SAML response which shows $(my ip address):443 as the \"Destination\", and the validation routine in response.py compares this with \"current_address\", which (in this example) is 127.0.0.0:8080 -- and thus throws an exception declaring the response invalid.\r\n\r\nThis seems like a fairly common situation, and AFAICT, there is no config-based remedy. Sure, you can just hack the request data that you use to construct the OneLogin_Saml2_Auth instance in the first place -- and a TODO in response.py seems to acknowledge as much -- but this feels dirty.\r\n\r\nAll of that to say, it would be cool if the expected 'destination' could be overridden in the settings file."},"comment":{"url":"https://api.github.com/repos/onelogin/python-saml/issues/comments/133069387","html_url":"https://github.com/onelogin/python-saml/issues/81#issuecomment-133069387","issue_url":"https://api.github.com/repos/onelogin/python-saml/issues/81","id":133069387,"user":{"login":"pitbulk","id":600897,"avatar_url":"https://avatars.githubusercontent.com/u/600897?v=3","gravatar_id":"","url":"https://api.github.com/users/pitbulk","html_url":"https://github.com/pitbulk","followers_url":"https://api.github.com/users/pitbulk/followers","following_url":"https://api.github.com/users/pitbulk/following{/other_user}","gists_url":"https://api.github.com/users/pitbulk/gists{/gist_id}","starred_url":"https://api.github.com/users/pitbulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitbulk/subscriptions","organizations_url":"https://api.github.com/users/pitbulk/orgs","repos_url":"https://api.github.com/users/pitbulk/repos","events_url":"https://api.github.com/users/pitbulk/events{/privacy}","received_events_url":"https://api.github.com/users/pitbulk/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T16:36:09Z","updated_at":"2015-08-20T16:36:09Z","body":"@wfBeastie I think that some changes on the \r\n[prepare_django_request](https://github.com/onelogin/python-saml/blob/master/demo-django/demo/views.py#L18) method to set the proxy data should be enough for solve the destination issue."}}