Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding X-Forwarded-for header in httpd access log #400

Closed
wants to merge 10 commits into from
4 changes: 3 additions & 1 deletion lib/compute/jenkins-main-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ export class JenkinsMainNode {
// Configuration to proxy jenkins on :8080 -> :80
InitFile.fromString('/etc/httpd/conf.d/jenkins.conf',
httpConfigProps.useSsl
? `<VirtualHost *:80>
// eslint-disable-next-line no-useless-escape,max-len
? `LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined & LogFormat "%h %l %u %t \"%r\" %>s %b" common
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Redirect permanent / https://replace_url.com/
</VirtualHost>
Expand Down
Loading