Jump to content

Swagger address issues with reverse proxy


aptalca

Recommended Posts

aptalca

Hi I just started using swagger, but although the interface and the functionality is super cool, I noticed a couple of issues.

 

1. The swagger test url is incorrect when accessed via reverse proxy.

 

I have my emby reverse proxied via nginx. In emby network settings, I have the external domain set and the secure connection mode set to handled by reverse proxy. Everything works as expected. I do not have any port forwarding (auto or manual) for emby itself. And no http port is forwarded (I don't see an option to turn off http access in emby settings, I'm forced to put a public http port in)

 

With swagger ui, The top url bar and the link underneath "Emby Server API" title appear correct, pointing to the https endpoint. But the servers dropdown only lists "http://emby.domain.url:8096/emby"which is, as expected, not accessible. Therefore, none of the tests work because they are all sent to a non-working http address.

 

post-90124-0-48410600-1584025192_thumb.jpg

 

Is there a way to have the swagger ui use the https endpoint for the tests?

 

2. Whenever I send emby an http post for library refresh via curl, I receive a code 204, content-length: 0

 

Thanks

Link to comment
Share on other sites

Hi, for #2, and?

 

For #1, does the server dashboard list the current local and remote addresses?

Link to comment
Share on other sites

aptalca

#1. Yes, it does show the correct addresses.

 

post-90124-0-51619500-1584028813_thumb.jpg

 

#2. The library refresh is still executed so it's not that big of a deal, but 204 means no proper feedback as to whether the api call was successful or not (or does it simply mean a 200 with no actual body response?)

Link to comment
Share on other sites

  • 1 month later...

Any word on the swagger API issue? I'm experiencing it as well.

 

Can you please describe your issue? Thanks.

Link to comment
Share on other sites

  • 1 month later...
adamrussak
On 4/27/2020 at 11:36 PM, Luke said:

 

Can you please describe your issue? Thanks.

hi,

im not using a revers proxy but i get issues with swagger as well.

both localhost:8096/swagger and https://my.dns.com/swagger

are giving me the api swagger as json format page:

 

a sample:

{
  "swagger": "2.0",
  "info": {
    "title": "Emby Server API",
    "description": "Explore the Emby Server API",
    "termsOfService": "https://emby.media/terms",
    "contact": {
      "name": "Emby Developers",
      "url": "https://emby.media/community/index.php?/forum/47-developer-api"
    },
    "version": "4.4.3.0"
  },
  "host": "localhost:8096",
  "basePath": "/emby",
  "schemes": [

 

Link to comment
Share on other sites

adamrussak

my server is on Window 10 1909,

emby server 4.4.3.0
when i got to $url\swagger i get json output and not a swagger UI (as posted above)
when i check in chrome F12 it seems all works fine and no Browser errors

Edited by adamrussak
Link to comment
Share on other sites

neik
1 hour ago, Luke said:

What issue are you having?

This isn't the first time I've seen this being reported and without deep-diving into the API, I have been wondering if anyone with the information on that page to can hack a Emby server more easily?

Link to comment
Share on other sites

pir8radio
5 hours ago, neik said:

This isn't the first time I've seen this being reported and without deep-diving into the API, I have been wondering if anyone with the information on that page to can hack a Emby server more easily?

possibly that's why in my nginx config i disable access to it since I'm not using it.

     location ^~ /swagger {   ## Disables access to swagger interface
        return 404;
}

 

  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...