Lasso 8.6 - All Headers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso 8.6 - All Headers

Steffan A. Cline
I can’t recall…

Is there some kind of shortcut/undocumented tag that gives access to the entire header in a web request in LP8.6?

Looking to see any additional headers on OS X Server to parse out the real IP from any additional headers inserted the web caching server.

Due to the way Apple labels their services, it’s even been hard trying to find any good clear docs how to bypass the web caching server. Anyone seen a good article?


Steffan A. Cline
[hidden email]
602-793-0014





#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6 - All Headers

French, Shelane
I use this for the IP. It's a modification of Johan and Jason's code:

define_tag(
        'IP',
        -namespace='request_',
        -priority='replace',
        -description='Returns real Client IP behind proxy, load balancer etc'
);
        local('header' = request_params,
                'ip'=string);
       
        if(#header->find('X-Forwarded-For'));
                // de facto standard for proxies,
http://en.wikipedia.org/wiki/X-Forwarded-For
                // can also return "unknown"
                #ip = #header->find('X-Forwarded-For');
                #ip -> trim;
        else(#header->find('client-ip'));
                #ip = #header->find('client-ip');
        else(#header->find('PC-Remote-Addr'));
                // for server side cache, like Performace Cache
                #ip = #header->find('PC-Remote-Addr');
        else;
                #ip = string(client_ip);
        /if;
        #ip = #ip->split(',')->first; // needed to get the actual client ip for
x-forwarded-for, instead of the entire proxy chain
        return(@#ip);
/define_tag;





Then I use client_headers for headers.



On 8/31/18, 11:38 AM, "[hidden email] on behalf of
Steffan A. Cline" <[hidden email] on behalf of
[hidden email]> wrote:

>I can¹t recallŠ
>
>Is there some kind of shortcut/undocumented tag that gives access to the
>entire header in a web request in LP8.6?
>
>Looking to see any additional headers on OS X Server to parse out the
>real IP from any additional headers inserted the web caching server.
>
>Due to the way Apple labels their services, it¹s even been hard trying to
>find any good clear docs how to bypass the web caching server. Anyone
>seen a good article?
>
>
>Steffan A. Cline
>[hidden email]
>602-793-0014
>
>
>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6 - All Headers

Wade Maxfield
In reply to this post by Steffan A. Cline
> On 1/09/2018, at 06:38, Steffan A. Cline <[hidden email]> wrote:
>
> Due to the way Apple labels their services, it’s even been hard trying to find any good clear docs how to bypass the web caching server. Anyone seen a good article?


Depending on what exactly you have set up on OS X and how your hosts are defined, then this may be all you need to bypass it:

ps ax | grep http

look for Proxy or apache_serviceproxy.conf

/usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log

if it is running, stop it it with

sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/serviceproxyctl stop


 - Wade



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>