I am using umbraco 17.4.2, application is hosted in Ubuntu server under docker container with nginx reverse proxy. Now my problem is that, the umbraco backend does not work on the server. The website itself is working fine. When I go to /umbraco, it redirects to login page. After successful login, it redirects to the following URL with 404 error.
https://circlecart.app/umbraco/management/api/v1/security/back-office/authorize?client_id=umbraco-back-office&redirect_uri=https%3A%2F%2Fcirclecart.app%2Fumbraco%2Foauth_complete&scope=offline_access&response_type=code&state=BhUy9zKRkHKWBLY1EyHcbBrkY8NF8UcV&code_challenge=TFflfkjf1p1zCU2esh_Wf57x8-g7i_aC6_1Iqn4Nyrs&code_challenge_method=S256&prompt=consent&access_type=offline
I saw several blogs relating to this issue, but none of them could help. I have the following settings in appsettings.json
"CMS": {
"Global": {
"UmbracoApplicationUrl": "https://circlecart.app"
},
"WebRouting": {
"UmbracoApplicationUrl": "https://circlecart.app"
},
"Security": {
"AllowUnsecureBackOfficeHttp": true,
"BackOfficeHost": "http://circlecart.app"
},
"RuntimeMinification": {
"UseRuntimeMinification": true
},
"DeliveryApi": {
"Enabled": true
},
"Content": {
"MacroErrors": "Throw"
},
"Hosting": {
"Debug": true
},
"Deploy": {
"Settings": {
"ApiSecret": "xxxxxxxxxxxxxxxxxxx"
}
},
"Project": {
"CurrentWorkspaceName": "Live",
"Workspaces": [
{
"Id": "efef5e89-a19b-434b-b68a-26e022a0ad52",
"Name": "Live",
"Type": "live",
"Url": "https://circlecart.app"
}
]
}
}
This part of my Program.cs
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor |
ForwardedHeaders.XForwardedProto |
ForwardedHeaders.XForwardedHost;
options.KnownIPNetworks.Clear();
options.KnownProxies.Clear();
options.RequireHeaderSymmetry = false;
});
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
var app = builder.Build();
// Boot Umbraco
await app.BootUmbracoAsync();
app.UseForwardedHeaders();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
Can anyone please help? Thank you