Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 408
    • Issues 408
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !916

Resolve "S3 nginx proxy/redirect"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Agate requested to merge 932-nginx-proxy into develop Oct 03, 2019
  • Overview 6
  • Commits 1
  • Pipelines 2
  • Changes 6

Closes #932 (closed)

This was affecting DSub (and possibly other subsonic clients that send an Authorization header) when using Minio or S3.

cc @xorander00 and @Sporiff

Side note on the debugging:

Symptoms: DSub wasn't streaming audio when using Minio/S3 as a storage backend on Funkwhale. Other Subsonic clients worked fine.

Solution:

  1. Spend 30m to reproduce the issue (setup minio locally, upload some files, configure DSub, etc.)
  2. Observe that Minio returns a 400 error
  3. Spend 1h trying to find out how to output the response body (which is likely to contain the actual error)
  4. Dive into Nginx and Lua scripting to output the response body from Minio to nginx logs (https://serverfault.com/questions/361556/is-it-possible-to-log-the-response-data-in-nginx-access-log)
  5. See that Minio complains about incorrect authentication
  6. See that DSub send an Authorization header that is forwarded to Minio, but has nothing to do with Minio
  7. Ensure the header is stripped by Nginx

It was fun :p

Edited Oct 03, 2019 by Agate
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 932-nginx-proxy