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

%20 Added to Paths When Using BASE_PATH="/" in Docker Compose #642

Open
0xA1-devops opened this issue Nov 15, 2024 · 0 comments
Open

%20 Added to Paths When Using BASE_PATH="/" in Docker Compose #642

0xA1-devops opened this issue Nov 15, 2024 · 0 comments

Comments

@0xA1-devops
Copy link

0xA1-devops commented Nov 15, 2024

Description

When setting BASE_PATH="/" in the Docker Compose configuration for synapse-admin, URLs are incorrectly encoded with %20, causing issues with request routing.

Example

Given the following docker-compose.yml:

services:
  synapse-admin:
    container_name: synapse-admin
    build:
      context: .
      args:
        - BASE_PATH=/
    ports:
      - "127.0.0.1:50000:80"
    restart: unless-stopped

Requests through an external proxy (e.g., Nginx) such as:

http://your-domain/synapse-admin/

may result in URLs like:

http://127.0.0.1:50000/%20/synapse-admin/assets/index.js

Suggested Fix

Change BASE_PATH="/" to BASE_PATH=/ in the docker-compose.yml file to avoid encoding issues:

args:
  - BASE_PATH=/

Environment

  • Image: awesometechnologies/synapse-admin:latest
  • Deployment Method: Docker Compose
  • Reverse Proxy: Nginx
  • Build Source: master (9fc0050)
  • Docker version: 20.10.24+dfsg1
  • docker-compose version: 1.29.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant