whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: preserve hostname on redirect
Date Tue, 02 Aug 2016 02:27:17 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  54599d2   preserve hostname on redirect
54599d2 is described below

commit 54599d2e6eca9e008b67a83ccfd89c967b40c541
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Aug 1 22:26:58 2016 -0400

    preserve hostname on redirect
---
 www/board/agenda/routes.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index b5edef2..ed691bb 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -19,8 +19,9 @@ end
 
 # redirect root to latest agenda
 get '/' do
+  url = "#{request.scheme}://#{request.host}#{request.path}"
   agenda = dir('board_agenda_*.txt').sort.last
-  redirect to("/#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/")
+  redirect "#{url}#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/"
 end
 
 # redirect missing to missing page for the latest agenda

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message