{"action":"created","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/558","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/558/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/558/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/558/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/558","id":119863451,"number":558,"title":"How to specify host for links?","user":{"login":"brandonparsons","id":1277162,"avatar_url":"https://avatars.githubusercontent.com/u/1277162?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonparsons","html_url":"https://github.com/brandonparsons","followers_url":"https://api.github.com/users/brandonparsons/followers","following_url":"https://api.github.com/users/brandonparsons/following{/other_user}","gists_url":"https://api.github.com/users/brandonparsons/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonparsons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonparsons/subscriptions","organizations_url":"https://api.github.com/users/brandonparsons/orgs","repos_url":"https://api.github.com/users/brandonparsons/repos","events_url":"https://api.github.com/users/brandonparsons/events{/privacy}","received_events_url":"https://api.github.com/users/brandonparsons/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T04:06:18Z","updated_at":"2015-12-03T17:16:00Z","closed_at":null,"body":"Hi there,\r\n\r\nI'm trying to use a slightly different setup in my development environment, and need to tell JSONAPI-Resources to use a specific host in the links attributes that it returns, rather than the host that rails is currently bound to.\r\n\r\nIs this possible?"},"comment":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/comments/161720350","html_url":"https://github.com/cerebris/jsonapi-resources/issues/558#issuecomment-161720350","issue_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/558","id":161720350,"user":{"login":"lgebhardt","id":29154,"avatar_url":"https://avatars.githubusercontent.com/u/29154?v=3","gravatar_id":"","url":"https://api.github.com/users/lgebhardt","html_url":"https://github.com/lgebhardt","followers_url":"https://api.github.com/users/lgebhardt/followers","following_url":"https://api.github.com/users/lgebhardt/following{/other_user}","gists_url":"https://api.github.com/users/lgebhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/lgebhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgebhardt/subscriptions","organizations_url":"https://api.github.com/users/lgebhardt/orgs","repos_url":"https://api.github.com/users/lgebhardt/repos","events_url":"https://api.github.com/users/lgebhardt/events{/privacy}","received_events_url":"https://api.github.com/users/lgebhardt/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T17:16:00Z","updated_at":"2015-12-03T17:16:00Z","body":"The LinkBuilder is responsible for generating the links. If you override the `base_url` method on your controller it should flow down to the LinkBuilder. Note that all links being serialized will use this `base_url`, so that may create issues depending on your requirements.\r\n\r\nHere's the default:\r\n```ruby\r\n    def base_url\r\n      @base_url ||= request.protocol + request.host_with_port\r\n    end\r\n```\r\n"}}