Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.
/ bpy-redirect Public archive

The easiest way to setup all working redirects to your main page

License

Notifications You must be signed in to change notification settings

MarcArchive/bpy-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPY-REDIRECT

Github top language Github language count Repository size License


🎯 About

Use this to setup the right ingame redirects for your bancho.py instance

✨ Redirect Routes

✔️ /u/:userid
✔️ /beatmapsets/:beatmap/discussion
✔️ /beatmapsets/:set_id/discussion/:beatmap
✔️ /beatmaps/:beatmap
✔️ /beatmapsets/:beatmap
✔️ /home/account/edit

✅ Requirements

Before starting 🏁, you need to have Git and Node installed and at the moment there are only setup instructions for nginx.

🏁 Installing

# Clone this project
$ git clone https://github.com/osu-NoLimits/bpy-redirect

# Change dir and install dependencies
cd bpy-redirect
npm install

# Copy env file and change config
cp .env.example .env
nano .env # or vim idc

📝 Nginx setup

# Go into your current bancho nginx config
server {
  listen 80;
  listen [::]:80;
  server_name c.osunolimits.dev ce.osunolimits.dev c4.osunolimits.dev osu.osunolimits.dev b.osunolimits.dev api.osunolimits.dev;
  client_max_body_size 20M;

  # ADD THOSE ROUTES
  location /u/ {
    proxy_pass http://localhost:8080;
  }

  location /home/account/edit {
    proxy_pass http://localhost:8080;
  }

  location /beatmapsets/ {
    proxy_pass http://localhost:8080;
  }

  location /beatmaps/ {
    proxy_pass http://localhost:8080;
  }
  # END OF BPY-REDIRECT ROUTES

  location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    add_header Access-Control-Allow-Origin *;
    proxy_redirect off;
    proxy_pass http://bancho;
  }
}

📝 Running

screen -S redirect # open a screen to keep the session running
npm run serve

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by Marc Andre Herpers

 

Back to top

About

The easiest way to setup all working redirects to your main page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors