Use this to setup the right ingame redirects for your bancho.py instance
✔️ /u/:userid
✔️ /beatmapsets/:beatmap/discussion
✔️ /beatmapsets/:set_id/discussion/:beatmap
✔️ /beatmaps/:beatmap
✔️ /beatmapsets/:beatmap
✔️ /home/account/edit
Before starting 🏁, you need to have Git and Node installed and at the moment there are only setup instructions for nginx.
# 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
# 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;
}
}
screen -S redirect # open a screen to keep the session running
npm run serve
This project is under license from MIT. For more details, see the LICENSE file.
Made with ❤️ by Marc Andre Herpers