Kentico 13 Admin site Azure App Gateway setup

Matthew Butler asked on October 27, 2022 17:59

I'm currently in the process of setting up the Admin site behind an app gateway.

How do you set it up to work with the Forwarded details, as currenlty redirecting to the azurewebsites.net domain when I try and login.

Thanks

Mat

Recent Answers


Juraj Ondrus answered on October 28, 2022 06:27

I would say that the idea of the gateway is similar to a proxy, right? If yes, then I would follow documentation.

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on October 28, 2022 10:00

Yes, that is the approach I followed. It appears I have the same issues as

https://devnet.kentico.com/questions/invalid-redirect-when-running-kentico-cms-behind-a-proxy-server

The it works if I go directly to /Admin/CMSAdministration.aspx, but going to root redirects to the azurewebsites.net domain

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 28, 2022 16:05

I would say there is something set on Azure - I am not aware of Kentico doing such a redirect.

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on October 28, 2022 16:13 (last edited on October 28, 2022 16:15)

I assume it the authentication redirect, as accessing it locally does the redirect e.g.

https://admin-dev.testsite.com/ ->

(302) https://admin-dev.testsite.com/admin ->

(302) https://admin-dev.testsite.com/admin/ ->

(302) https://admin-dev.testsite.com/admin/CMSAdministration.aspx ->

https://login.microsoftonline.com...

Test Site

https://admin.testsite.com/ ->

(302) https://admin-dev.testsite.azurewebsites.net/admin ->

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 28, 2022 16:31

You are using some external authentication? If yes, what is set there as the target/authentication URL?

0 votesVote for this answer Mark as a Correct answer

Matthew Butler answered on October 28, 2022 17:16 (last edited on October 28, 2022 17:18)

The

Identity provider URL: https://login.microsoftonline.com/..

Allowed audience URIs: https://admin-dev.testsite.com/

The site works fine on azure using custom domains without a proxy. but as soon as you put behind the proxy and remove the custom domain it redirects to the wrong url

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.