You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/08/02 02:27:17 UTC
[whimsy] branch master updated: preserve hostname on redirect
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 <ru...@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" <co...@whimsical.apache.org>'].