> On Apr 18, 2017, at 4:43 AM, Johann Werner <j...@oyosys.de> wrote:
> 
> Hi Klaus,
> 
> I would use a relative URL but set some header values to mimic a request 
> coming from a webserver proxy. Try something like this:
> 
> 
> String host = "apps.berkeling.us";
> String isSecure = true;
> 
> ERXApplication app = ERXApplication.erxApplication();
> NSMutableDictionary<String, String> headers = new NSMutableDictionary<>();
> if (!app.isDevelopmentMode()) {
>    headers.put("x-webobjects-adaptor-version", "Apache");
>    headers.put("host", host);
>    headers.put("x-webobjects-server-port", isSecure ? "443" : "80");
> }
> ERXRequest fakeRequest = new ERXRequest("GET", app.adaptorPath() + "/" + 
> app.name() + ".woa", "HTTP/1.1“, headers, null, null);
> WOContext context = new ERXWOContext(fakeRequest);
> 
> 
> Does that work for you?
> 


This is indeed the direction I’m heading into, creating the context from a fake 
request.

Thanks.


Klaus Berkling
www.berkling.us <http://berkling.us/> | Photography <https://kib.smugmug.com/>




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to