Defect #8044
closedAtom feeds use internal IP instead of dns name set in settings
0%
Description
here the config
Client -> HTTPS -> Reverse Proxy -> HTTP -> Redmine
where feed url reported right which is 
https://www.somewhere.com/redmine/issues.atom?key=69fbf4b4e...
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>SKY SUPPORT: Latest projects</title>
  <link href="https://172.23.11.199/redmine/projects.atom?key=69fbf4b4ea5fa9386b443b38c6be338b738bcc7e" rel="self"/>
  <link href="https://172.23.11.199/redmine/projects" rel="alternate"/>
  <id>https://172.23.11.199/redmine/</id>
  <updated>2011-03-16T17:05:28+08:00</updated>
  <author> ...
in the feed, the internal ip was used, but in redmine config the host and path was set to 
www.somewhere.com/redmine
redmine revision 5282
      
      Updated by Pip Chan over 14 years ago
      
    
    problem fixed via by modifying the following file
redmine/app/views/common/feed.atom.rxml
change all ":only_path => false" to ":only_path => true"
i.e. 
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
  xml.title   truncate_single_line(@title, :length => 100)
  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => true))
  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => true, :format => nil, :key => nil))
  xml.id      url_for(:controller => 'welcome', :only_path => true)
  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
  xml.author  { xml.name "#{Setting.app_title}" }
  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
  @items.each do |item|
    xml.entry do
      url = url_for(item.event_url(:only_path => true))
      if Herve Harster
        xml.title truncate_single_line(item.event_title, :length => 100)
      else
        xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
      end
      xml.link "rel" => "alternate", "href" => url
      xml.id url
      xml.updated item.event_datetime.xmlschema
      author = item.event_author if item.respond_to?(:event_author)
      xml.author do
        xml.name(author)
        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
      end if author
      xml.content "type" => "html" do
        xml.text! textilizable(item, :event_description, :only_path => true)
      end
    end
  end
end
another issue is how to set the site generated feed at firefox's bookmark.
      
      Updated by Pip Chan over 14 years ago
      
    
    the problem is from "auto_discovery_link_tag", it generates the wrong discovery link since it based on the server ip or dns. if the redmine server is behind the firewall then it will have problem.
      
      Updated by Pip Chan over 14 years ago
      
    
    - Status changed from New to Resolved
 
this problem was fixed in #2813
Add the following options in the Reverse Proxy Apache Server (virtual host) config will solve it
ProxyPreserveHost On
      
      Updated by Etienne Massip over 14 years ago
      
    
    - Status changed from Resolved to Closed
 - Resolution set to Invalid