Skip to content

Commit

Permalink
Merge pull request #114 from sparkfabrik/feat/fastcgi_forward_http_us…
Browse files Browse the repository at this point in the history
…er_agent

feat: add user agent parameter in fastcgi forwarded parameters
  • Loading branch information
Monska85 committed May 22, 2024
2 parents 86a34b8 + 1a727e4 commit f264f46
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Docker

on:
push:
branches:
- "feature/d8"
pull_request:
branches:
- "feature/d8"
push:
branches: "feature/d8"

env:
IMAGE_NAME: docker-php-drupal-nginx
Expand All @@ -18,25 +16,23 @@ jobs:
matrix:
version:
[
1.26.0-alpine-slim,
1.25.5-alpine-slim,
1.25.3-alpine-slim,
1.25.1-alpine-slim,
1.23.3-alpine-slim,
1.23.3-alpine,
1.23.1-alpine,
1.21.6-alpine,
1.21.1-alpine,
1.17.6-alpine,
1.13.6-alpine,
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build images
run: |
Expand All @@ -63,21 +59,19 @@ jobs:
matrix:
version:
[
1.26.0-alpine-slim,
1.25.5-alpine-slim,
1.25.3-alpine-slim,
1.25.1-alpine-slim,
1.23.3-alpine-slim,
1.23.3-alpine,
1.23.1-alpine,
1.21.6-alpine,
1.21.1-alpine,
1.17.6-alpine,
1.13.6-alpine,
]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/feature/d8'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Refs https://github.com/docker/login-action#github-container-registry
- name: Login to GitHub Container Registry
Expand All @@ -88,10 +82,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build and push images to GitHub Container Registry
run: |
Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Add tags for the official nginx image to build
IMAGE_TAGS ?= 1.13.6-alpine \
1.17.6-alpine \
1.21.1-alpine \
1.21.6-alpine \
1.23.1-alpine \
IMAGE_TAGS ?= 1.23.1-alpine \
1.23.3-alpine \
1.23.3-alpine-slim \
1.25.1-alpine-slim \
1.25.3-alpine-slim
1.25.3-alpine-slim \
1.25.5-alpine-slim \
1.26.0-alpine-slim

IMAGE_NAME ?= sparkfabrik/docker-php-drupal-nginx

Expand Down
1 change: 1 addition & 0 deletions templates/fastcgi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param X_FORWARDED_FOR $http_x_forwarded_for;
fastcgi_param ADD_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
fastcgi_param WEBSERVER_REQUEST_ID $request_id;
fastcgi_param HTTP_USER_AGENT $http_user_agent;

## Fix HTTPoxy vulnerability https://httpoxy.org/#mitigate-nginx.
fastcgi_param HTTP_PROXY '';
Expand Down

0 comments on commit f264f46

Please sign in to comment.