Good plan.
On Sep 16, 2013 10:57 AM, "Greg Sutcliffe" <notifications@github.com> wrote:

> In app/models/concerns/host_template_helpers.rb:
>
> > @@ -27,9 +27,30 @@ def media_path
> >
> >    #returns the URL for Foreman based on the required action
> >    def foreman_url(action = "provision")
> > -    url_for :only_path => false, :controller => "/unattended",
> > -            :action => action,
> > -            :token => (@host.token.value unless @host.token.nil?)
> > +    # Get basic stuff
> > +    local = URI.parse(Setting[:foreman_url])
> > +    host = local.host || request.host
> > +    port = local.port || request.port
> > +
> > +    # Only proxy templates if both the proxy and the host support it
> > +    proxy = @host.subnet.tftp
> > +    if proxy.features.map(&:name).include?('Templates') and !@host.token.nil?
>
> @witlessbird <https://github.com/witlessbird> I think we agree it's a
> good idea, it's just not really in scope for this PR - lets submit a
> redmine issue and refactor later (or before :P)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/theforeman/foreman/pull/751/files#r6372207>
> .
>