lib/zold/node/front.rb in zold-0.9.11 vs lib/zold/node/front.rb in zold-0.10

- old
+ new

@@ -72,10 +72,11 @@ after do headers['Cache-Control'] = 'no-cache' headers['Connection'] = 'close' headers['X-Zold-Version'] = VERSION + headers['Access-Control-Allow-Origin'] = '*' end get '/robots.txt' do 'User-agent: *' end @@ -139,9 +140,14 @@ host: r[:host], port: r[:port] } end ) + end + + get %r{/(?<page>.+\.html)} do + content_type 'text/html' + File.read(File.join(settings.root, "html/#{params[:page]}")) end not_found do status 404 content_type 'text/plain'