diff options
author | francis <francis> | 2007-11-29 00:05:49 +0000 |
---|---|---|
committer | francis <francis> | 2007-11-29 00:05:49 +0000 |
commit | cf7e6456c31ed7d23f695d5e1463969f52d5980e (patch) | |
tree | 72988878defc115d9ead86ea18eb32a07fc9d81e | |
parent | d11510256311b769b63598907533130ee55693b4 (diff) |
Deep evil for the admin interface to work over https.
-rw-r--r-- | app/views/layouts/admin.rhtml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml index 42ad0be49..9f45eba93 100644 --- a/app/views/layouts/admin.rhtml +++ b/app/views/layouts/admin.rhtml @@ -11,7 +11,12 @@ <body> <p><b>FOIFA admin interface:</b> -<%= link_to 'Public bodies', :controller => 'admin_public_body', :action => 'list' %> +<% # This is evil. We have to use ../../blah relative URLs so it still works + # when proxied over HTTPS from secure.mysociety.org - which it has to be as + # it is our admin interface and is protected by valuable passwords. + url_prefix = ('../' * (request.request_uri.split('/').size - 3)) +%> +<%= link_to 'Public bodies', url_prefix + 'body/list' %> </p> <p style="color: green"><%= flash[:notice] %></p> |