Open bartmans opened 8 months ago
@bartmans Could you also share the nginx proxy configuration?
Pfft I will try. I use the Synology DSM method. so don't know where the config lives. I know behind the GUI they use nginx. Will search.
Edit: found it: server { listen 443 ssl; listen [::]:443 ssl;
server_name airsonic.gufp.nl ;
if ( $host !~ "(^airsonic.gufp.nl$)" ) { return 404; }
include /usr/syno/etc/www/certificate/ReverseProxy_68f0d88f-7f6e-4272-862c-a12c9362a340/cert.conf*;
include /usr/syno/etc/security-profile/tls-profile/config/ReverseProxy_68f0d88f-7f6e-4272-862c-a12c9362a340.conf*;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
location / {
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_intercept_errors off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.178.20:4041;
}
error_page 403 404 500 502 503 504 /dsm_error_page;
location /dsm_error_page {
internal;
root /usr/syno/share/nginx;
rewrite (.*) /error.html break;
allow all;
}
}
@bartmans
Sometimes the $http_host header isn't passed through in the way expected so its best to use $host
Can you try changing proxy_set_header Host $http_host;
to proxy_set_header X-Forwarded-Host $host;
?
Relevant entry now looks like below. On Synology I don't see a way to remove
proxy_set_header Host $http_host;
Only to add additional headers. For reference: config file on Synology DSM 7 lives in /etc/nginx/sites-enabled (this file can't be changed manually, it's controlled via webinterace)
server { listen 443 ssl; listen [::]:443 ssl;
server_name airsonic.gufp.nl ;
if ( $host !~ "(^airsonic.gufp.nl$)" ) { return 404; }
include /usr/syno/etc/www/certificate/ReverseProxy_68f0d88f-7f6e-4272-862c-a12c9362a340/cert.conf*;
include /usr/syno/etc/security-profile/tls-profile/config/ReverseProxy_68f0d88f-7f6e-4272-862c-a12c9362a340.conf*;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
location / {
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_intercept_errors off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.178.20:4041;
}
error_page 403 404 500 502 503 504 /dsm_error_page;
location /dsm_error_page {
internal;
root /usr/syno/share/nginx;
rewrite (.*) /error.html break;
allow all;
}
}
What happened?
In the log I see an error after logging in in Airsonic: Origin check enabled but transport 'jsonp' does not support it.
Steps to reproduce
Install latest edge and log in.
Version
11.1.x (Edge)
Version Detail
11.1.4-SNAPSHOT.20240221145945
Operating System
Docker
Java Version
Apache Tomcat/9.0.83, java 17.0.10, Linux (409,2 MB / 1,88 GB)
Database
Other
DB Detail
sqlite - not dbase server
Configuration paramter
Airsonic preferences. NOTE: This file is automatically generated. Do not modify while application is running
Airsonic preferences. NOTE: This file is automatically generated. Do not modify while application is running
EncryptionKeyPassword= SettingsChanged= JWTKey= DlnaEnabled=false DlnaServerName=Airsonic DlnaBaseLANURL=http://192.168.178.25/airsonic/ DlnaServerId=8c88e797-a32e-4380-8cb1-537d025239de IndexString=A B C D E F G H I J K L M N O P Q R S T U V W X-Z(XYZ) IgnoredArticles=The El La Los Las Le Les De Het Een GenreSeparators=; Shortcuts= PlaylistFolder=/playlists MusicFileTypes=mp3 ogg oga aac m4a m4b flac wav wma aif aiff ape mpc shn mka opus alm 669 mdl far xm mod fnk imf it liq wow mtm ptm rtm stm s3m ult dmf dbm med okt emod sfx m15 mtn amf gdm stx gmc psm j2b umx amd rad hsc flx gtk mgt mtp wv VideoFileTypes=flv avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts webm CoverArtFileTypes2=cover.jpg cover.png cover.gif folder.jpg jpg jpeg gif png CoverArtSource=FILE CoverArtConcurrency=4 CoverArtQuality=90 SortAlbumsByYear=true GettingStartedEnabled=false WelcomeTitle=Sepulchrijn: Bart's Muziek WelcomeSubtitle=Beta WelcomeMessage2= LoginMessage= server.servlet.session.timeout=3600m Theme=ripserver LocaleLanguage=nl LocaleCountry= LocaleVariant= IndexCreationInterval=1 IndexCreationHour=2 FastCacheEnabled=false OrganizeByFolderStructure=true UploadsFolder=%{['USER_MUSIC_FOLDERS'][0]}/Incoming ExcludePattern=#recycle|@eaDir|gsdata IgnoreSymLinks=true DownloadBitrateLimit=0 UploadBitrateLimit=0 LdapEnabled=false LdapUrl=ldap://host.domain.com:389/cn=Users,dc=domain,dc=com LdapSearchFilter=(sAMAccountName={0}) LdapManagerDn= LdapAutoShadowing=false SmtpServer= SmtpEncryption=SSL/TLS SmtpPort=465 SmtpUser= SmtpFrom= SmtpPassword=55746b576869303031302121 CaptchaEnabled=false ReCaptchaSiteKey=6 HideIndexedFiles=false PodcastUpdateInterval=-1 PodcastEpisodeRetentionCount=2 PodcastEpisodeDownloadCount=0 spring.liquibase.parameters.mysqlVarcharLimit=384 DbBackupUpdateInterval=24 DbBackupRetentionCount=5 EnableCueIndexing=false
Proxy Server
Synology Nginx
client detail
Firefox
language
Dutch
Relevant log output