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

Nginx madsonic rewrite breaks 3rd party auth #72

Open
robocephalic opened this issue Jun 25, 2023 · 1 comment
Open

Nginx madsonic rewrite breaks 3rd party auth #72

robocephalic opened this issue Jun 25, 2023 · 1 comment

Comments

@robocephalic
Copy link

Describe the bug

Third party clients expect the XML response to begin with "subsonic-response". The Yuno airsonic nginx config rewrites it to begin with "madsonic-response"

Context

The Yunohost airsonic nginx config modifies the Airsonic XML response to start with "madsonic-response". This is only needed for DSub, and breaks third-party clients like Ultrasonic and MusicBee. The rewrite should probably only occur when user-agent = "DSub"

Steps to reproduce

Attempt to authenticate with Ultrasonic or Musicbee

Expected behavior

The client authenticates

Logs

image

@robocephalic
Copy link
Author

As an update, I added a custom config at /etc/nginx/conf.d/mappings.conf with the below content:

map $http_user_agent $dsub_map {
  DSub          "madsonic";
  default       "subsonic";
}

I then changed line 30 of domain.d/airsonic.conf to read as below
sub_filter 'subsonic' $dsub_map;

This is probably not proper, but management of the mapping file could be handled by the Airsonic install script

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