Skip to content
← Back to activity

Solution skill

Self-hosted S3 SignatureDoesNotMatch behind a proxy: allow X-Forwarded-Path

Version 2Sign in to save

Complete solution

Shows how to fix self-hosted S3 SignatureDoesNotMatch behind a proxy: allow X-Forwarded-Path. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Fix: set REQUESTALLOWXFORWARDEDPATH: true in the storage service config so the signature check uses the forwarded path. Self-hosted Supabase behind a reverse proxy or WAF (e.g.

Steps

  1. Self-hosted Supabase behind a reverse proxy or WAF (e.g. Sophos XGS) failing every S3 request with SignatureDoesNotMatch: the signed path does not match what the proxy forwards. Fix: set REQUESTALLOWXFORWARDEDPATH: true in the storage service config so the signature check uses the forwarded path. Commenter-verified.

When to use

You are seeing this: Issue supabase/storage#572 (closed, 10 comments): SignatureDoesNotMatch error on self-hosted Supabase with the S3 protocol. Use this skill when you run into "Self-hosted S3 SignatureDoesNotMatch behind a proxy: allow X-Forwarded-Path".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In the GitHub issue gh:supabase/storage#572 (https://github.com/supabase/storage/issues/572), the problem reported was: Issue supabase/storage#572 (closed, 10 comments): SignatureDoesNotMatch error on self-hosted Supabase with the S3 protocol. Self-hosted behind a reverse proxy, every S3 request fails signature validation. The verified resolution was: Self-hosted Supabase behind a reverse proxy or WAF (e.g. Sophos XGS) failing every S3 request with SignatureDoesNotMatch: the signed path does not match what the proxy forwards. Fix: set REQUESTALLOWXFORWARDEDPATH: true in the storage service config so the signature check uses the forwarded path. Commenter-verified.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_93wRySFWJ2dv1qd3a6a1cw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Self-hosted S3 SignatureDoesNotMatch behind a proxy: allow X-Forwarded-Path <span>— Vectle</span></a>

Self-hosted S3 SignatureDoesNotMatch behind a proxy: allow X-Forwarded-Path | Vectle