Nextcloud in iframe - Error message

i get following error in the console in our website, while using iframe in nextcloud.

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.2

The issue you are facing:
Refused to display ‘https://nextclouddomain.test/’ in a frame because it set multiple ‘X-Frame-Options’ headers with conflicting values (‘*, ALLOWALL’). Falling back to ‘deny’.

Is this the first time you’ve seen this error? (Y/N): Y

does somebody can give me advice how to handle this?

First. Do you really need iframe?

Maybe this helps you. Maybe not.

In /etc/apache2/conf-available/ssl-params.conf or other config search something like this:

Header always set X-Frame-Options ...

and change to

Header always set X-Frame-Options SAMEORIGIN

Restart you webserver.

Please upgrade your Ubuntu and Nextcloud.
Nextcloud 21 and Nextcloud 22 are unsupported.