http and https conversion
"Thejokrishna Aspari" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I know this topic has been discussed several times, sorry for bringing it again.
Here is my case
1. My Login page is secure (has the href attribute set to a method
securePageURL which returns a HTTPS URL)
2. It logs in fine with https. no issues.
3. Now, I have 2 links on the Home page, one needs to be secure and
the other does'nt.
4. I have set the "secure" attribute of one to "false". If I click on
that and eventually return to the Home page, my home page is now in
HTTP
5. So, now if I click on the secure link, it goes via HTTP.
(Setting "secure" to "true" for this link adds the :443 to the URL)
How do I ensure that when the user comes back to the Home Page, it
comes via HTTPS? (User clicks on an "Go Back" button to come back to
the previous page)
I tried overriding appendToResponse of the Home page and added a WORedirect.
WORedirect secureRedirect = new WORedirect(context);
String httpsURL = "https://" +
WORequestAdditions.hostName(context().request()) +
context().request().uri();
secureRedirect.setUrl(httpsURL);
secureRedirect.appendToResponse(response, context);
But this does not work. Any ideas?
Thanks in Advance.
Regards,
Thejo.