openvpn http-proxy-option headers, doing it server-side? - http-headers

i'm connecting to my vpn via a proxy in order to pass some custom headers.
The way i actually do it it's by putting them in my .ovpn gonfig file, something like this:
http-proxy-option CUSTOM-HEADER Host my.host
http-proxy-option CUSTOM-HEADER User-Agent My-User-Agent
But i would like to config the proxy on the server to handle those, so if i ever need to change anything i wouldn't have to modify every configuration.
My final goal is to handle the headers on the server side of the connection in order to put only the http-proxy parameter in the .ovpn config file.
I've tried to follow a Metahackers' article on how to inject http headers with squid but it didn't work for me.
Do you have any advice or do you have resources you can point me at?
Thanks.

Related

Apache and Nginx as reverse proxy: where to add X-Robots-Tag?

If Nginx works as reverse proxy between Apache and the web, where should i add X-Robots-Tag (to add some additional headers) - in the htaccess of Apache or in the Nginx configuration file?
You can do it in either place. Although, for a header like X-Robots-Tag, which is very much page specific then it would probably be easier to set this at the application server (in your application/CMS). Devs may not have access to the proxy server in order to apply specific headers.
Alternatively, you might choose to do this in the front-end proxy if you wanted to apply this to every request, or to a specific pattern.
But you should not apply the same header in both places, as that becomes hard to maintain (and debug).

Add custom reponse header by using tomcat config only

I have a few tomcats load balanced behind a VIP(virtualIP) and Apache is configured to talk via AJP to the tomcat VIP. There is a need to know which tomcat served the request for debugging/monitoring purposes. And so the tomcat instance that served the request should ideally send a unique response header .
However I dont see how I can achieve that without writing custom filter code to do that. Ideally I want this unique header value to reside in tomcat conf/properties folder.
Any suggestions ?

How to run Apache Flume on http source including path url?

I am running an Apache Flume http source on localhost and binding it to a port, as described in the documentation:
agent.sources.httpSource.type = http
...
agent.sources.httpSource.port = 80
Now my source is listening on http://<ip>:80. How can I modify it so it could run with a path in the url? like so: http://<ip>:80/example_path?
I didn't find anything in the documentation and in the web concerning this issue.
have you tried to simply sent the data to http://<ip>:80/example_path? As far as a I know, it should work, independently of the path within the URL. A very different thing is if you want to implement a specific behaviour depending on the path. In that case, you will have to create a custom handler for the HTTPSource source by extending HTTPSourceHandler.

Clicktale integration - trouble with reverse proxy on (on Acquia)

We are trying to incorporate ClickTale for our site which is hosted on Acquia. But there seems to be a problem and we would like to hear from people over here if they have come across a similar situation.
We already have HTTPS enabled.
Because of HTTPS, we had to change
our DNS setting from an A record to a CNAME record.
Now based on
this ClickTale Wiki -
http://wiki.clicktale.com/Article/Help_talk:Drupal_integration_module_v1...
whenever we have a reverse proxy, we need to make sure that the IP
address of the proxy is allowed which would mean ClickTale servers
be able to identify the IP address of the end user.
Because we have a CNAME record, we have a canonical URL but we dont have an IP.
How do we deal with this situation? If we do not do anything, will Acquia servers ensure that the right headers are in place such that ClickTale servers could read end users IP?
As per Acquia documentation they use the X-forwarded-for header to forward you the client IP, see https://docs.acquia.com/articles/logging-client-ip-apache-behind-reverse-proxy
So from the doc you quote yourself, i would enable the following:
If your proxy includes the original IP address in the HTTP headers, you could add a module setting in your config.php file to instruct the module to use that header. If your proxy uses a header field called "X-Forwarded-For" (this is common), then add $config['IPAddressHeaderFieldName'] = "X-Forwarded-For"; to your config.php file to utilize this field.

How configure the HTTP Headers in Weblogic Response

Using Weblogic 11g and want to be able to add headers to all files served up by weblogic. There is no seperate web server sitting in front of weblogic. Cannot find a way to configure weblogic to add header to the HTTP response. In IIS you can easily do this by choosing the server and clicking to add headers. Looking for the equivalent way to do this in weblogic.
I dont think this is configurable. You would have to write a Filter to manipulate the headers as you need.
As a hint, you could try something along the lines of this package http://flavio.tordini.org/http-headers-filter. I have not tried this myself
If you have the option of putting Apache server in front of your Weblogic server, then you can configure Apache to do that using this. As an additional benefit, you can configure the Apache server to serve static content.
PS: Not just Apache but Lighttpd and Nginx also allow you to do that.
<url-rewriting-enabled></url-rewriting-enabled>
Can occur zero or one time.
When this flag is set to false, WebLogic will add the following header with the response Cache-control: no-cache=set-cookie so that the proxy caches do not cache the cookies.
defaults to true
http://w3processing.com/Setups.php?freepageId=19