lib/siteleaf/server.rb in siteleaf-0.9.5 vs lib/siteleaf/server.rb in siteleaf-0.9.6
- old
+ new
@@ -40,10 +40,10 @@
site = Siteleaf::Site.new({:id => self.site_id})
url = env['PATH_INFO']
path = url.gsub(/\/\z|\A\//, '') #strip beginning and trailing slashes
- if !File.directory?(path) and File.exist?(path)
+ if !['sitemap.xml','feed.xml'].include?(path) and !File.directory?(path) and File.exist?(path)
Rack::File.new(Dir.pwd).call(env)
else
template_data = nil
is_asset = /^(?!(sitemap|feed)\.xml)(assets|.*\.)/.match(path)
\ No newline at end of file