Since I did not get any suggestions I tried myself during the weekend
and managed to make it work. Here is what I was doing:
1) add one method to inner class Secure.Security
static boolean neetSSL() {
return false;
}
this can be customized by user.
2) modify method login of class Secure to:
public static void login() throws Throwable {
if (needSSL() && request.secure == false) {
request.secure = true;
login(); // call itself again to ensure traffic over
https
} else {
// original code here
}
}
3) Without any override then the modified Secure module just works as
before.
4) To customize the default ssl setting I then just override the the
new added method needSSL in my Security class extends Secure.Security
to make
proper setting, i.e, the login request is over https on production
server
only)
Please comment if I anything I did wrong.
Thanks,
Bendanpa
On May 8, 12:48 am, Bendanpa <
benda...@gmail.com> wrote:
> Hi,
>
> I have a toy app running on GAE and GAE nicely supports https request.
> all the traffic are over https if I browse the home page with URLhttps://myapp
>
> I have one question on how to pre-set a link to a page over https
> instead of http?
>
> suppose the page's url is "/alumnicontroller/show?id=6", and the link
> is:
>
> href="@{AlumniController.show(
xy.id)}"
>
> What should I do to make the link to "
https://my-gae-site/
> alumnicontroller/show?id=6" (nothttp://blahblah) so that clicking