| Issue 97: | Per anchor control of flipping between http and https for a session rather than whole application | |
| 2 people starred this issue and may be notified of changes. | Back to list |
How to run a single site that flips back and forth between secure and non secure pages dynamically on a anchor to anchor basis and generating the unspecified anchors correctly (I hacked up my own versions of secureCallback: and unsecuredCallback: to do this on ReserveTravel) because setting the server port and server protocol globally on the application itself seems wrong, but maybe I'm missing something. Here's what I currently do... WAAnchorTag>>secureCallback: actionBlock url := (canvas secureCallback: actionBlock) displayString WAAnchorTag>>unsecuredCallback: actionBlock url := (canvas unsecuredCallback: actionBlock) displayString WARenderCanvas>>secureCallback: actionBlock ^ (context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock)) scheme: #https; port: 443; yourself WARenderCanvas>>unsecuredCallback: actionBlock ^ (context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock)) scheme: #http; port: 80; yourself That's enough to generate the anchors that force a switch to http or https and seems generic enough, but for allowing unspecified regular #callback: to work correctly for both modes I use something I think I got from Avi a few years ago that looks for an http header from Apache in my session class.. SSSession>>actionUrlForContinuation: aContinuation | url | url := super actionUrlForContinuation: aContinuation. self useSSL ifTrue: [ url scheme: #https; port: 443 ]. ^ url SSSession>>actionUrlForKey: aString | url | url := super actionUrlForKey: aString. self useSSL ifTrue: [ url scheme: #https; port: 443 ]. ^ url SSSession>>useSSL ^ currentRequest headers includesKey: 'arnhttps' |
|
,
Aug 29, 2008
(No comment was entered for this change.)
Labels: -Type-Defect Type-Feature
|
|
,
Aug 29, 2008
(No comment was entered for this change.)
Labels: -Priority-Medium Priority-Low
|
|
|
|