Report API - async option not returning appPath url.

  • I am trying to use the "options": {"reports": { "async": true }}. This does run and I get back an URL. The issue I am having is the URL does not adhere to the string that I have setup in my appPath configuration.


    I post an API request\api\report with the body of {"reports": { "async": true }}.

    The URL I get back is'. This is the url to the web app service the docker container is hosted on.

    I thought I should get back a URL of

    Should I be getting back the report appPath in the return URL?


  • The appPath is the app subpath which is used to calculate the URL returned in the async report output Location header.

    When I have in appPath config "/myreports" and post to localhost. The Location header will be http://localhost:5488/myreports/reports/oU0NKlzyrI3fkXdv/status


    Doesn't it work for you like that?

    The domain in the link is calculated from the request headers also based on the X-Forward-For headers which are typically added by load balancers/application gateways or application servers.
    If you post to the but get back in the link, than it could be something wrong with the headers that reach the jsreport.

  • This does not seem to be the way it is working for me. This looks like it works for you because your example you are not changing the domain. Event though I am setting the headers at both the gateway or on the post it does not seem like the code is using them for generating the location.


    1. docker running on web app. url:
    2. Application gateway. This does a rewrite rule to forward this request from to docker app (line 1). I did add a X-Forwarded-For hearder on gateway for domain(did not help) screenshot below.
    3. appPath to be /reportserver/jsr. This fixes the pathing in the browser and directs request to the correct url because of application gateway.

    Screen shot from jseport showing correct url for the api to post requests to.

    This is a screen shot from postman posting to the url. As you can see the location has the azure web app url along with the appPath.

    app gateway rewrite rule for X-Forwarded-For

    Additional attempt to apps the X-Forwarded-For and X-Forwarded-Host headers in the postman request.

    Is there a way to see if the headers are making it to jsreport? Also is there a way to turn on a verbose logging to see what the app log is doing?

  • Yes, the problem is the most likely misconfiguration of your application gateway. I wasn't clear with the X-Forwarded-For. There are several headers every reverse proxy needs to send so the backend app can work properly.

    The X-Forwarded-For should contain the client IP and the X-Forwarded-Host the original host. The correct X-Forwarded-Host should primarily help.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.