Is this possible via the Show if design area?


#1

I'm hoping to use the show if design area to display certain content to select visitors within our network.

 

Problem is, IP address sniffing via server variable detection isn't an option as I'd hoped, due to the way our network has (apparently...) been set-up.

 

On a Matrix site hosted outside our network, I've successfully detected the visitors I need via their firewall's IP (using show if design area - IP detect).

So I'm wondering... is there any way I could utilise this remote detection and somehow feed it back to a Show if design area condition within our network?

 

Maybe I'm overcomplicating things... (or have lofty expectations)

 

Cheers in advance for any words of wisdom and/or alternate ways I could achieve this.

 

Matrix (v4.16.1)


(Nic Hubbard) #2

Do you mean that your server is behind a proxy? If so, you can use the HTTP_X_FORWARDED header, but make sure to also set this in System Preferences: http://manuals.matrix.squizsuite.net/server-administrator/chapters/annotated-main.inc#use-http-x-forwarded-for

 

Then use the Server Variable Condition for your show_if:

http://manuals.matrix.squizsuite.net/designs/chapters/show-if-design-area#server-variable


#3

Thanks for your reply Nic. That looks like it would've been the ticket, although our server does not sit behind a proxy within our network.

 

I am now thinking that the REMOTE_HOST server var might be the go.

As I get no printout when testing the global keyword %globals_server_REMOTE_HOST% , I assume that our server requires configuring for this variable as the PHP server manual  states.

 

Being a Squiz SLA client, this is probably something Squiz will need to do. Before venturing down that route, I wanted to verify my understanding of whether the REMOTE_HOST variable would return the value of the "Default Server" value of a cmd prompt's nslookup.

 

 

 

 

Sorry Nic, It appears reply attempt turned to snow. Anyways... this void was meant to be filled with the above.


(Nic Hubbard) #4

?


#5

Update + Closure:

 

We had HostnameLookups enabled in Apache webserver. 

But... In my case, couldn't be relied upon as not all our IPs have a reverse record set (as it was revealed during testing).  :(