turt2live / matrix-dimension

An open source integration manager for matrix clients, like Element.
https://dimension.t2bot.io
GNU General Public License v3.0
431 stars 110 forks source link

running own etherpad-light instance: Sorry, this content cannot be embedded #356

Open flyinghuman opened 4 years ago

flyinghuman commented 4 years ago

Hello, i setup dimension to work with our own RIOT and matrix-synapse homeserver. So far so good. Now we would like to have our own hosted etherpad-light integrated with RIOT. It is on the same server like riot is and can accessed via https://myriothost.tld/pad using nginx reverse proxy.

If we change the defautl url for the widget to our own etherpad-light a error message shows up: Sorry, this content cannot be embedded. What is the reason for that? can anyone here help me? Thanks! Etherpad_error

flyinghuman commented 4 years ago

i found a plugin for add embedding headers which solved my problem: https://www.npmjs.com/package/ep_helmet

i only must add my dimension domain name in the etherpad seetings file:

"ep_helmet":{
  "frameguard":{
    "action": "allow-from",
    "domain": "https://DOMAINIFRAMEWILLBEHOSTEDIN.com"
  }
}
flyinghuman commented 4 years ago

nope, today the same error occured. reopening this issue. what can i do? configure nginx with special options? thanks!

TheOneWithTheBraid commented 3 years ago

@flyinghuman Did you somehow fix the issue? I encounter the same issue.

rumsant commented 3 years ago

I am having this same problem.

dimm0 commented 3 years ago

Same here

flyinghuman commented 3 years ago

@flyinghuman Did you somehow fix the issue? I encounter the same issue.

yes, it is working for me with nginx settings:

location /pad {
                rewrite                /pad/(.*) /$1 break;
                rewrite                ^/pad$ /pad/ permanent;
                proxy_pass             http://localhost:9001/;
                proxy_pass_header Server;
                proxy_redirect         / /pad/;
                proxy_set_header       Host $host;
                proxy_buffering off;
                proxy_hide_header X-Frame-Options;
        }
dimm0 commented 3 years ago

I fixed the error above by removing the room name from URL. It didn't like the "!" symbol... Now I'm having CORS issues :(

flyinghuman commented 3 years ago

I fixed the error above by removing the room name from URL. It didn't like the "!" symbol... Now I'm having CORS issues :(

try the helmet plugin in etherpad-lite and the above mentioned nginx proxy_hide_header X-Frame-Options;

dimm0 commented 3 years ago

Ok, I fixed it without the plugin. Simply removing the $room makes the trick, since private rooms have "!" in the name