AciDCooL 7 Posted October 2, 2017 Share Posted October 2, 2017 Hello Everyone, Since aprox last week I experience a wierd problem. I started to notice that I needed to login after every browser refresh. The site https://xxxx/emby/web/login.html is getting diplayed, but the fun part is im still logged in because I can click the little home icon in the top left corner. Then I get redirected to https://xxx/web/home.html. Smart me though hey let's give it a try and use https://xxx/emby/web/home.html as my bookmark. But even that one goes to login page with the home icon on the top left. Is this intended behaviour? Because I remember being logged in and staying logged in for at least a week before a login page would pop up. I attached the logs, think I reloaded the page 3 or 4 times in quick succession, and every time I got the login page. loginbug.txt Link to comment Share on other sites More sharing options...
ebr 14930 Posted October 2, 2017 Share Posted October 2, 2017 Do you have a plug-in or setting in your browser that is clearing browsing data or cookies? Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted October 2, 2017 Share Posted October 2, 2017 I see the same using external connections, local connections do not behave like this. There are a couple topics on this also. Link to comment Share on other sites More sharing options...
arrbee99 1561 Posted October 2, 2017 Share Posted October 2, 2017 Sounds to me a bit like this thing I'm having https://emby.media/community/index.php?/topic/51342-cover-art-buttons/ and https://emby.media/community/index.php?/topic/50662-chrome-thing/&do=findComment&comment=486904 ...if I read what you said correctly, you get sent back to login, I get sent back to login and then straight through to dashboard home page. Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted October 2, 2017 Share Posted October 2, 2017 Sounds to me a bit like this thing I'm having https://emby.media/community/index.php?/topic/51342-cover-art-buttons/ and https://emby.media/community/index.php?/topic/50662-chrome-thing/&do=findComment&comment=486904 ...if I read what you said correctly, you get sent back to login, I get sent back to login and then straight through to dashboard home page. This issue is specific to connection type. I get sent to login screen on Remote/External connections on a browser Refresh, Local/LAN connections Refreshes work fine. Link to comment Share on other sites More sharing options...
AciDCooL 7 Posted October 2, 2017 Author Share Posted October 2, 2017 Do you have a plug-in or setting in your browser that is clearing browsing data or cookies? I just used Internet Explorer, and thats clean as can be since I never have used it on my 2016 machine. And I can reproduce the problem every refresh. So its not a plugin on chrome (version 61 btw) But its not like I get logged out, like said the home button is there and when I click it I get to the homepage. I'm using Emby on Fedora linux behind a reverse proxy nginx and sublink /emby. Trying to fix it I thought I could change php.ini, but php cookies have no influence since it's a webapp dohhhh... ######################################### # Emby # ######################################### location /emby { # Send traffic to the backend proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_pass http://127.0.0.1:8096; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $server_name; proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Host $remote_addr; proxy_buffering off; client_max_body_size 0; proxy_read_timeout 36000s; proxy_redirect off; proxy_ssl_session_reuse off; proxy_pass_header Authorization; proxy_set_header Host $host; # Send websocket data to the backend aswell proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted October 2, 2017 Share Posted October 2, 2017 (edited) I just used Internet Explorer, and thats clean as can be since I never have used it on my 2016 machine. And I can reproduce the problem every refresh. So its not a plugin on chrome (version 61 btw) But its not like I get logged out, like said the home button is there and when I click it I get to the homepage. I'm using Emby on Fedora linux behind a reverse proxy nginx and sublink /emby. Trying to fix it I thought I could change php.ini, but php cookies have no influence since it's a webapp dohhhh... ######################################### # Emby # ######################################### location /emby { # Send traffic to the backend proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_pass http://127.0.0.1:8096; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $server_name; proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Host $remote_addr; proxy_buffering off; client_max_body_size 0; proxy_read_timeout 36000s; proxy_redirect off; proxy_ssl_session_reuse off; proxy_pass_header Authorization; proxy_set_header Host $host; # Send websocket data to the backend aswell proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } See this post: https://emby.media/community/index.php?/topic/51126-emby-wants-me-to-login-everytime-the-browser-refreshes/ and the accompanying post within the answer. Edited October 2, 2017 by pir8radio Link to comment Share on other sites More sharing options...
AciDCooL 7 Posted October 2, 2017 Author Share Posted October 2, 2017 See this post: https://emby.media/community/index.php?/topic/51126-emby-wants-me-to-login-everytime-the-browser-refreshes/ and the accompanying post within the answer. Thanks I will reissue my certificate tomorrow and make a subdomain, but strange thing is it has worked for weeks. And there was a reason that I went to sublink but it's late and cant think straight after a 15 hour workday Gotta love Citrix and their bugs this is nothing compared hehe Link to comment Share on other sites More sharing options...
Solution pir8radio 1292 Posted October 2, 2017 Solution Share Posted October 2, 2017 (edited) Thanks I will reissue my certificate tomorrow and make a subdomain, but strange thing is it has worked for weeks. And there was a reason that I went to sublink but it's late and cant think straight after a 15 hour workday Gotta love Citrix and their bugs this is nothing compared hehe You don't have to use a subdomain, if you want to remain using /emby just edit your config like this: You just need to strip the /emby from making its way to the emby server... I think they are making some software changes that is doing away with the /emby I bet its hard for them to maintain that fix anyway.. Plus this makes for neater reverse proxy setup IMO Let us know how you made out. location /emby/ { #note the backslash after emby rewrite ^/emby(/.*)$ $1 break; #this will strip /emby from the requests going into emby backend ######################################### # Emby # ######################################### location /emby/ { #note the backslash after emby # Send traffic to the backend rewrite ^/emby(/.*)$ $1 break; #this will strip /emby from the requests going into emby backend proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_pass http://127.0.0.1:8096; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $server_name; proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Host $remote_addr; proxy_buffering off; client_max_body_size 0; proxy_read_timeout 36000s; proxy_redirect off; proxy_ssl_session_reuse off; proxy_pass_header Authorization; proxy_set_header Host $host; # Send websocket data to the backend aswell proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } Edited October 2, 2017 by pir8radio 1 Link to comment Share on other sites More sharing options...
AciDCooL 7 Posted October 2, 2017 Author Share Posted October 2, 2017 You are a god, this works like a charm saves the hassle for the reissue. Just a quick question, why the trailing / on /emby/ ? 1 Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted October 2, 2017 Share Posted October 2, 2017 (edited) You are a god, this works like a charm saves the hassle for the reissue. Just a quick question, why the trailing / on /emby/ ? We add the trailing slash to the original url because regex is going to eat the slash when it strips /emby off. I mean I guess we could have written that differently as not to need the trailing slash but it's how i've always done it lol.. So you start out with /emby/ which equals, 127.0.0.1:8096/emby/otherstuff/ to your backend server, otherwise without the trailing slash the backend would see 127.0.0.1:8096/emby/otherstuff which is fine normally, but we are now using regex to do "stuff" ^/emby(/.*)$ $1 so in that regex ^ is the beginning of a string and $ is the end, within that string after /emby we want to match the / and anything after it (/.*) and put that into a variable $1 (otherstuff) ignoring, or leaving behind /emby, so the end result of that regex is 127.0.0.1:8096/otherstuff (it just ate the /emby and pasted the rest on the end) If we didn't have the trailing slash we couldn't pluck out the stuff after /emby as easily, and your server would see 127.0.0.1:8096otherstuff lol I had to read over that like 5 times, I wrote it wrong that many times lol I guess i'm a bit tired too! Edited October 3, 2017 by pir8radio Link to comment Share on other sites More sharing options...
AciDCooL 7 Posted October 3, 2017 Author Share Posted October 3, 2017 Makes allot of sense now, thanks for the thorough explanation. Think I gonna check my other reverse proxy rules, see if I can polish them a bit with this information. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now