Wrong REST API endpoint/url generation
Wrong REST API endpoint/url generation
Hi Team
We are using the DocuVieware July 2021 version for the ASP.NET framework 4.8 MVC views.
It is hosted within the Azure app service container. The HTTPS/SSL is terminated at the Azure side.
The problem is DocuVieware is internally generating the REST path dvapi3/docuvieware3api Url.
1.It is accessed via the HTTP protocol instead of the HTTPS protocol.
Wrong Url http://XXXXxx.azurewebsites.net/dvapi3/ ... erequest/1
Correct Url https://XXXXxx.azurewebsites.net/dvapi3/docuvieware3api/baserequest/1
2. The same application is accessed by multiple domains names (hostnames). These names are accessible via the X-Forwarded-Host header
So the document viewer API calls are blocked by the browsers and the document never loads in the browser.
Possible solution. While generating the URL please honor the X-Forwarded-Proto and X-Forwarded-Host headers while generating the URLs
Is there any workaround already exists for this issue?
We are using the DocuVieware July 2021 version for the ASP.NET framework 4.8 MVC views.
It is hosted within the Azure app service container. The HTTPS/SSL is terminated at the Azure side.
The problem is DocuVieware is internally generating the REST path dvapi3/docuvieware3api Url.
1.It is accessed via the HTTP protocol instead of the HTTPS protocol.
Wrong Url http://XXXXxx.azurewebsites.net/dvapi3/ ... erequest/1
Correct Url https://XXXXxx.azurewebsites.net/dvapi3/docuvieware3api/baserequest/1
2. The same application is accessed by multiple domains names (hostnames). These names are accessible via the X-Forwarded-Host header
So the document viewer API calls are blocked by the browsers and the document never loads in the browser.
Possible solution. While generating the URL please honor the X-Forwarded-Proto and X-Forwarded-Host headers while generating the URLs
Is there any workaround already exists for this issue?
Re: Wrong REST API endpoint/url generation
Hello Sabaria,
It seems your code takes the relative URL instead of the absolute one.
Can you try to override the application URI? It should force the protocol and will provide the absolute URL to your app.
ApplicationUri parameter -> https://www.docuvieware.com/guides/aspn ... ring).html
Tell me if it corrects the issue or if I misunderstood it.
With best,
Fabio
It seems your code takes the relative URL instead of the absolute one.
Can you try to override the application URI? It should force the protocol and will provide the absolute URL to your app.
ApplicationUri parameter -> https://www.docuvieware.com/guides/aspn ... ring).html
Tell me if it corrects the issue or if I misunderstood it.
With best,
Fabio
Re: Wrong REST API endpoint/url generation
Hi Fabio
Thanks for the response.
As I mentioned, the application is a multi-tenant application with multiple subdomains are set up for the same application.
For example, the users can access the application via https://XXXXxx.azurewebsites.net/ https://YYyy.azurewebsites.net/ and https://ZZzz.azurewebsites.net/, etc.
I cannot use the ApplicationUri parameter which is common for every request.
Can you please help me to set up this relative URL for each request when generating the client-side HTML? Or please honor the X-Forwarded-Proto and X-Forwarded-Host headers while generating the URLs which are HTTP industry standards.
Please consider this as high priority issue...
Thanks for the response.
As I mentioned, the application is a multi-tenant application with multiple subdomains are set up for the same application.
For example, the users can access the application via https://XXXXxx.azurewebsites.net/ https://YYyy.azurewebsites.net/ and https://ZZzz.azurewebsites.net/, etc.
I cannot use the ApplicationUri parameter which is common for every request.
Can you please help me to set up this relative URL for each request when generating the client-side HTML? Or please honor the X-Forwarded-Proto and X-Forwarded-Host headers while generating the URLs which are HTTP industry standards.
Please consider this as high priority issue...
Re: Wrong REST API endpoint/url generation
Anyone, could you please help us resolve this issue?
Re: Wrong REST API endpoint/url generation
Hello,
Sorry for the late.
You need to set the load-balancer address as the absolute URL to let it dispatch the requests by itself.
With best,
Fabio
Sorry for the late.
You need to set the load-balancer address as the absolute URL to let it dispatch the requests by itself.
With best,
Fabio
Re: Wrong REST API endpoint/url generation
Hi As I mentioned I cannot use an absolute URL that will accept only one value where my application is having multiple domains configured in the load balancer. So it has to change for each request.
Re: Wrong REST API endpoint/url generation
Anyone, could you please help us resolve this issue?
https://itkoding.com/cara-membuat-halaman-di-microsoft-word/
https://itkoding.com/cara-membuat-halaman-di-microsoft-word/
Last edited by rizaref on Wed Oct 06, 2021 4:11 am, edited 1 time in total.
Re: Wrong REST API endpoint/url generation
Hello,
The conversation had continued on our helpdesk and a ticket has been created on our side to implement a way to deal with such usage.
I'll keep you posted about any updates on this conversation.
With best,
Fabio
The conversation had continued on our helpdesk and a ticket has been created on our side to implement a way to deal with such usage.
I'll keep you posted about any updates on this conversation.
With best,
Fabio
Who is online
Users browsing this forum: No registered users and 0 guests