Embed webpage that use Authelia or Authentik

I am running Home assistant core and got some containers on my server that I embed using a Webpage card in Home assistant. This way I can link to the UI of those containers using the sidebar in home assistant.
I had basic auth enabled which resulted in me having to login to every page individually. I setup Authelia and Authentik which both work fine. However, when I embed a wegpage using Authelia or Authentik for authentication I get the following error:

My configuration.yml contains:

http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.0/24
- 172.16.0.0/16

Anyone know a solution to this?