grandnode2 icon indicating copy to clipboard operation
grandnode2 copied to clipboard

In Category layout- > Sorting, page selection, grid/list view etc. doesnt work if deployed in Azure Web Apps as docker

Open Nikhil13x opened this issue 3 years ago • 5 comments

Since the Azure web app uses ARR, the request reaching the code will be always http, regardless of the origin was from https.

var currentPageUrl = _httpContextAccessor.HttpContext.Request.GetDisplayUrl(); --> this line in GetViewSortSizeOptionsHandler.cs -> will be an http based URL . it wont be https.

Hence, we will get console error as below.. Mixed Content: The page at 'https://store.com/category?orderby=0&timestamp=1649072845451' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://store.com/category?orderby=0&timestamp=1649078904357&viewmode=grid'. This request has been blocked; the content must be served over HTTPS.

Reference: https://stackoverflow.com/questions/38501618/is-current-request-being-made-over-ssl-with-azure-deployment

Nikhil13x avatar Apr 04 '22 13:04 Nikhil13x

Please find settings UseForwardedHeaders in AppSettings and set on True

KrzysztofPajak avatar Apr 04 '22 14:04 KrzysztofPajak

Thanks for the info. Closing the issue. Will test this and reopen if required.

Nikhil13x avatar Apr 04 '22 17:04 Nikhil13x

It didn't work for the Azure web app deployed from the docker image..

Nikhil13x avatar Apr 05 '22 04:04 Nikhil13x

I use Azure web apps (not docker image) here https://grandnode.azurewebsites.net/ and It works well

KrzysztofPajak avatar Apr 05 '22 15:04 KrzysztofPajak

Yes.. its working when deployed to azure web app directly. (Even without setting the UseForwardedHeaders to true.) Should this issue be kept open to address the issue with docker deploy on azure web app?

Nikhil13x avatar Apr 08 '22 01:04 Nikhil13x