ShadowKindjal 19 Posted July 18, 2022 Share Posted July 18, 2022 (edited) I'm not sure if I have something configured incorrectly on my server but I've never been able to use the API button on the bottom of my dashboard to test API calls via swagger. I always have to open a command prompt or use postman to test my scripts for what seems to be simple issue. For some reason the web address under Servers on my swagger page begins with http instead of https. This means all my API calls done from that page fail but when I populate the command with https and use the same variables it works just fine. Is there a simple way for me to fix this? Edited July 18, 2022 by ShadowKindjal Link to comment Share on other sites More sharing options...
rbjtech 4219 Posted July 18, 2022 Share Posted July 18, 2022 (edited) Yea the link is http which is wrong - as swagger no longer supports this. ps - you might wanna blank out your FQDN in the 2nd screen grab ... Swagger > Emby also needs to use https - or if you are not using https - then http via localhost will work. This is browser restriction - there are a few posts on it as I originally raised it - try a search. Edited July 18, 2022 by rbjtech Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 18, 2022 Author Share Posted July 18, 2022 Quote Yea the link is http which is wrong - as swagger no longer supports this. Yea, I had managed to come to that conclusion but I don't know where swagger is getting that from. my server is set up for https Quote ps - you might wanna blank out your FQDN in the 2nd screen grab ... I honestly thought I had caught all of em so thx for that catch. Quote Swagger > Emby also needs to use https - or if you are not using https - then http via localhost will work. This is browser restriction - there are a few posts on it as I originally raised it - try a search. So how do I get swagger to use https? All I'm doing is clicking the API button at the bottom of my dashboard. I only access my server via HTTPS. Link to comment Share on other sites More sharing options...
rbjtech 4219 Posted July 18, 2022 Share Posted July 18, 2022 (edited) So if you click on the API button in the deashboard - do you not get https ? edit - Ah - you are still on 4.7.x.x - this is fixed in the latest Beta 4.8.0.6 https://swagger.emby.media/?url=XXXXXXX ? If it uses http - then just overtype with https As your emby server is https - then there should not be any further complication. Both swagger and emby need to use https. Edited July 18, 2022 by rbjtech Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 18, 2022 Author Share Posted July 18, 2022 If I click on the API link it takes me to a HTTPS page but the dropdown for servers has a HTTP link I can't change. Is this the functionality that is fixed in the latest beta? Link to comment Share on other sites More sharing options...
rbjtech 4219 Posted July 18, 2022 Share Posted July 18, 2022 (edited) This is what I get - is this what you need ? Edited July 18, 2022 by rbjtech Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 18, 2022 Author Share Posted July 18, 2022 2 minutes ago, rbjtech said: This is what I get - is this what you need ? Just a heads up but you forgot to hide your domain under the "EMBY Server REST API (BETA) Link to comment Share on other sites More sharing options...
rbjtech 4219 Posted July 18, 2022 Share Posted July 18, 2022 Just now, ShadowKindjal said: Just a heads up but you forgot to hide your domain under the "EMBY Server REST API (BETA) lol - yea, saw that after I posted it - haha - edited now - thanks ! Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 18, 2022 Author Share Posted July 18, 2022 This is my output when I click the API button in my dashboard Link to comment Share on other sites More sharing options...
rbjtech 4219 Posted July 18, 2022 Share Posted July 18, 2022 Right - with you now - you don't get the https in the server selection box I would suggest this was fixed with a later emby version - but can't be 100% sure @Luke Please could you confirm ? Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 22, 2022 Author Share Posted July 22, 2022 @Luke Thoughts? Link to comment Share on other sites More sharing options...
Q-Droid 631 Posted July 22, 2022 Share Posted July 22, 2022 If you launch/login to Emby from your HTTPS URL then the rest should be correct. Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 22, 2022 Author Share Posted July 22, 2022 26 minutes ago, Q-Droid said: If you launch/login to Emby from your HTTPS URL then the rest should be correct. The screenshot I posted above is from an EMBY session launched with the HTTPS URL Link to comment Share on other sites More sharing options...
Q-Droid 631 Posted July 22, 2022 Share Posted July 22, 2022 That's odd. I'm on the stable release and the API and drop down links are correct. Are you behind a proxy? If so might need some tweaks. Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 22, 2022 Author Share Posted July 22, 2022 Yes, I'm behind a nginx reverse proxy Link to comment Share on other sites More sharing options...
Luke 36999 Posted July 31, 2022 Share Posted July 31, 2022 On 7/18/2022 at 12:12 PM, ShadowKindjal said: This is my output when I click the API button in my dashboard Do you have a proxy server that redirects to http? Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted July 31, 2022 Author Share Posted July 31, 2022 1 hour ago, Luke said: Do you have a proxy server that redirects to http? Yes, I have a nginx reverse proxy that redirects to the local ip over http. I've attached conf file. emby.subdomain.conf Link to comment Share on other sites More sharing options...
Luke 36999 Posted August 1, 2022 Share Posted August 1, 2022 On 7/31/2022 at 12:38 AM, ShadowKindjal said: Yes, I have a nginx reverse proxy that redirects to the local ip over http. I've attached conf file. emby.subdomain.conf 1.23 kB · 0 downloads Have you compared to this? Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted August 2, 2022 Author Share Posted August 2, 2022 21 hours ago, Luke said: Have you compared to this? I've updated my conf file with all of the settings from pir8radio's example and it has not resolved my issue. Link to comment Share on other sites More sharing options...
Luke 36999 Posted August 5, 2022 Share Posted August 5, 2022 @pir8radio how does this compare for you? Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted August 6, 2022 Share Posted August 6, 2022 What is the issue that is happening? If you are using my config I disable remote access to swagger in this line of the nginx config: location ^~ /swagger { ## Disables access to swagger interface return 404; Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted August 6, 2022 Author Share Posted August 6, 2022 22 minutes ago, pir8radio said: What is the issue that is happening? If you are using my config I disable remote access to swagger in this line of the nginx config: location ^~ /swagger { ## Disables access to swagger interface return 404; I commented out that line specifically. I'm just trying to use swagger but the drop-down in the app has the http address instead of the https address so i can't use any test anything from the page. Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted August 6, 2022 Share Posted August 6, 2022 8 minutes ago, ShadowKindjal said: I commented out that line specifically. I'm just trying to use swagger but the drop-down in the app has the http address instead of the https address so i can't use any test anything from the page. oh... im not sure how they tell swagger that you are using https.. let me read up above more... ok. well i assume its because emby doesnt really know you are actually using https.. whfat are your network settings set to for Secure connection mode: should be "handled by proxy" if it is and still doesnt work, @Luke may need to read the header to see if the connection was originally requested via https, then address accordingly.. You can also fix it in nginx, its called sub_filter but i dont think its baked into standard nginx, maybe it is now. but google sub_filter you can dynamically rewrite text as it passes through nginx.. so you can say something like the below to rewrite any text that passes by as https.. could have some side effects, its always good to make that as specific as possible more like http://yourdomain.com/swagger to https://yourdomain.com/swagger or something. sub_filter 'http://' 'https://'; Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted August 9, 2022 Author Share Posted August 9, 2022 On 8/6/2022 at 4:50 PM, pir8radio said: oh... im not sure how they tell swagger that you are using https.. let me read up above more... ok. well i assume its because emby doesnt really know you are actually using https.. whfat are your network settings set to for Secure connection mode: should be "handled by proxy" if it is and still doesnt work, @Luke may need to read the header to see if the connection was originally requested via https, then address accordingly.. You can also fix it in nginx, its called sub_filter but i dont think its baked into standard nginx, maybe it is now. but google sub_filter you can dynamically rewrite text as it passes through nginx.. so you can say something like the below to rewrite any text that passes by as https.. could have some side effects, its always good to make that as specific as possible more like http://yourdomain.com/swagger to https://yourdomain.com/swagger or something. sub_filter 'http://' 'https://'; My secure connection mode is indeed "handled by reverse proxy" and my swagger URL in the dropdown is still HTTP instead of HTTPS in Swagger. I will have to look into the sub_filter option for nginx but I imagine that to fix this issue it would require an emby update. Link to comment Share on other sites More sharing options...
ShadowKindjal 19 Posted August 29, 2022 Author Share Posted August 29, 2022 (edited) @Luke Is this something that an Emby update would fix? Edited November 18, 2022 by ShadowKindjal 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