openstad / openstad-frontend

MIT License
11 stars 7 forks source link

Default share image uses the wrong site URL #213

Open rudivanhierden opened 3 years ago

rudivanhierden commented 3 years ago

By default the share image uses apos.settings.getOption('appUrl'), which in the case of a Kubernetes cluster is set to the baseUrl, e.g. openstad.amsterdam.nl. Even though this URL might not even lead to a frontend server. This default share image should always use the current frontend URL.

Related ticket: https://trello.com/c/jL3lCOAn/94-standaard-share-image-pakt-de-verkeerde-site-url

ToshKoevoets commented 3 years ago

@rudivanhierden actually it's better to always have a frontend default site working, quiete a few things don't work if you don' have it.

When you install via Kubernetes you should always have one and in the latest version of the admin panel actually you can't delete this one and also not put basic auth on it.

We were using this system also for oAuth 2.0, but this unintentionally got removed and I fixed it but by using the CMS url connected to the login page. Im not sure if it's via a pr of you or I did it, need to look at better solution or bring it back. If the default CMS url is used, instead of using the CMS url that is connected to the login is the easiest way to guarantee a CMS url that doesn't use basic auth and therefore the logo will also get displayed on login page and emails.

If you don't have a frontend default CMS currently also when creating a new site via admin panel the images won't be working.

What probably would be best is to have a frontend url that's always open for assets without displaying a site, and without possibilities to remove it.