I seem to have a related issue to this
# contributing
e
I seem to have a related issue to this problem, when I try to login, I'm stuck in a redirect loop. Updated today to 16.3.1. Not fixing the problem 🙁 does someone has any more infos?
s
Please can you create a new forum post show a video of what's happening?
@Jacob Overgaard I have no clue whats happening behind the scenes with openiddict. I hope that you can maybe have a look since I saw that you made this pull request: https://github.com/umbraco/Umbraco-CMS/pull/19935 I would be very grateful.
j
Are you trying to proxy the whole Backoffice through Nuxt?
e
Yes
j
I dont know about that, you need to forward the original scheme and host at least and setup BackOfficeHost. But may I ask what you are trying to achieve with this setup?
e
Im in the prototyp phase still, but what I'm trying to archieve is: - Nuxt as Frontend where all the views etc. are, and umbraco in the backend as headless solution. - Nuxt is the entry point of every request (since in future I'm hosting on Azure and I don't want to bring in a third dependency with traefik or nginx) - Everything is dockerized - inspo: https://github.com/TYPO3-Headless/nuxt-typo3 hope that you can follow what I'm trying to do
j
That's fine, you can turn on the Content Delivery API in Umbraco, create a so called "API User" (you get an API key with that) and just call Umbraco directly without proxying.
So you host Umbraco on localhost:8081 for instance, you call that URL directly
and the frontend on localhost:3000 and setup the proxy to that port only, that should work
e
Thats the problem later with Azure, I can't make a request to the sidecar (is the second container - in this case the umbraco backend) directly so it has to go trough nuxt or an other proxy
j
That's fine as well, don't proxy the Backoffice though. That probably won't work. What you want is an API key and then proxy the content delivery API through Nuxt or nginx
e
Ok I'll have a look, thanks a lot in the meantime for your help!
j
You want your frontend to access the published cache anyway, so any data the Backoffice is gonna give you is not useful in that context. Content Delivery API lives on /umbraco/delivery/api and needs an Api-Key header to work. I said before you needed an API user, but that is not actually true, I see. That's for another API. You type in the API key for the content delivery API in the appsettings.json file (or provide an environment variable) and you use that key as the
Api-Key
header.
Copy code
json
{
    "Umbraco": {
        "CMS": {
            "DeliveryApi": {
                "Enabled": true,
                "PublicAccess": true,
                "ApiKey": "my-api-key",
                "DisallowedContentTypeAliases": ["alias1", "alias2", "alias3"],
                "RichTextOutputAsJson": false
            }
        }
    }
}
here are the available settings
e
I understand, the content part I already solved. But accessing the backoffice (/umbraco) won't work?
j
If you forward the right things, it should. Bear in mind that it needs to see the correct host, so you need to forward that as well. Not sure how OpenID works with forwarded headers though.
e
Yeah I've done that all, but it still won't work 🙁
@Jacob Overgaard you have any idea why the endless redirect loop is happening?
nvm, if i put traefik as reverse proxy infront of both container it works, so it has to do something with the nuxt proxy. In case your curious you can check the repo I've pushed the code. Thanks anyways Jacob!
j
Thanks for sharing the solution, @Edi, I'm sure that is very helpful to others !
2 Views