peertube inframe problem

Can you update again your peertube instance with the same command? I have tried to hide the x-frame header.

It would be nice if you embed video from my instance somewhere to your page, so that I can reproduce from my instance.
https://tv.datamol.org/videos/embed/0edb6d51-15b2-41a1-b64b-a10318688a66

https://ziuri.me/filmai/veiksmo/5379-pirmasis-isvalymas.html I added

Please update with the same command. The fix should work now,hopefully.

$ yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh/tree/iframe_fix peertube

I done this command but still the same 404 not found nginx https://tube.ziuri.me/videos/embed/69f72fbc-678e-4ff5-a1d7-bb620404aeb8

Can you do $ sudo service nginx restart and try again?

Can you show your nginx configuration?

cat /etc/nginx/conf.d/tube.ziuri.me.d/peertube.conf

Hey Possible to chage it via terminal? because now I just got error like here…

root@filmaidykai:/home/djsets# add_header X-Frame-Options https://peertube.filmaidykai.net/videos/embed
bash: add_header: command not found

I was trying to do it via ftp but oneprovider do not give root access by terminal simple to do it via terminal with comand sudo su so possible to do something?

root@filmaidykai:/home/djsets# cat /etc/nginx/conf.d/peertube.filmaidykai.net.d/peertube.conf
add_header X-Frame-Options https://peertube.filmaidykai.net/videos/embed;

location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
add_header Cache-Control "public, max-age=31536000, immutable";

alias /var/www/peertube/client/dist/$1;

}

location ~ ^/static/(thumbnails|avatars)/(.*)$ {
add_header Cache-Control "public, max-age=31536000, immutable";

alias /home/yunohost.app/peertube/storage/$1/$2;

}

location / {
 if ($scheme = http) {
    rewrite ^ https://$server_name$request_uri? permanent;
  }
proxy_pass http://localhost:9000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Hard limit, PeerTube does not support videos > 8GB
client_max_body_size 8G;
proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;

}

# Bypass PeerTube webseed route for better performances
location /static/webseed {
# Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client
limit_rate 800k;

if ($request_method = 'OPTIONS') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  add_header 'Access-Control-Max-Age' 1728000;
  add_header 'Content-Type' 'text/plain charset=UTF-8';
  add_header 'Content-Length' 0;
  return 204;
}

if ($request_method = 'GET') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

  # Don't spam access log file with byte range requests
  access_log off;
}

alias /home/yunohost.app/peertube/storage/videos;

}

Websocket tracker

location /tracker/socket {
# Peers send a message to the tracker every 15 minutes
# Don’t close the websocket before this time
proxy_read_timeout 1200s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://localhost:9000;
}

Hey I make fresh install again in contabo vps everything was fine till I was trying share video on my web page so I done all comands like [kanhu] was showing still nothing web page is showing just black screen any Idea what I have to do?
Im already done /etc/nginx/conf.d/peertube.ziuri.me.conf
Remove this line add_header X-Frame-Options “SAMEORIGIN”;
Restart nginx $ sudo service nginx restart still nothing

@djsets
I can see your videos using Firefox. Maybe clear your cache.

No Im talking about embed link like this one https://peertube.ziuri.me/videos/embed/d23e2c4a-519b-4c3c-9cf7-c92462660136

But then I posted on my own web page I get just black screen like shoing on this picture

https://peertube.ziuri.me/videos/embed/d23e2c4a-519b-4c3c-9cf7-c92462660136
The embed is working too. Check any other browser. I remember I fixed it for someone by changing the nginx config.

if you remember can tell for me what did you change in nginx config? because now if Im using for test peertube.cpy.re embed link is working fine

when Im trying to use my one what i can see just black screen

peertube.conf

location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
add_header Cache-Control "public, max-age=31536000, immutable";

alias /var/www/peertube/client/dist/$1;
}

location ~ ^/static/(thumbnails|avatars)/ {
if ($request_method = ‘OPTIONS’) {
add_header ‘Access-Control-Allow-Origin’ ‘*’;
add_header ‘Access-Control-Allow-Methods’ ‘GET, OPTIONS’;
add_header ‘Access-Control-Allow-Headers’ ‘Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type’;
add_header ‘Access-Control-Max-Age’ 1728000;
add_header ‘Content-Type’ ‘text/plain charset=UTF-8’;
add_header ‘Content-Length’ 0;
return 204;
}

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

# Cache 2 hours
add_header Cache-Control "public, max-age=7200";

root /home/yunohost.app/peertube/storage;

rewrite ^/static/(thumbnails|avatars)/(.*)$ /$1/$2 break;
try_files $uri /;

}

location / {
 if ($scheme = http) {
    rewrite ^ https://$server_name$request_uri? permanent;
  }
proxy_pass http://localhost:9000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Hard limit, PeerTube does not support videos > 8GB
client_max_body_size 8G;
proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;

}

# Bypass PeerTube webseed route for better performances
location /static/webseed {
# Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client
limit_rate 800k;

if ($request_method = 'OPTIONS') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  add_header 'Access-Control-Max-Age' 1728000;
  add_header 'Content-Type' 'text/plain charset=UTF-8';
  add_header 'Content-Length' 0;
  return 204;
}

if ($request_method = 'GET') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

  # Don't spam access log file with byte range requests
  access_log off;
}

alias /home/yunohost.app/peertube/storage/videos;

}

Websocket tracker

location /tracker/socket {
# Peers send a message to the tracker every 15 minutes
# Don’t close the websocket before this time
proxy_read_timeout 1200s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://localhost:9000;
}

Can you check this embed https://tv.datamol.org/videos/embed/0edb6d51-15b2-41a1-b64b-a10318688a66 and see if its working? If yes I have the fixe it in my server and I will compare which header has to be changed.

same problem like from my own vps black sreen

Can you test my link again to see if it works now? And maybe give me the embed page where you embed my link so that I can test.

You can see your video link here https://ziuri.me/filmai/5379-pirmasis-isvalymas.html Grotuvas section and one more page for you test https://www.filmai.info/3616-paveldetas-hereditary-2018.html

For me now it works on firefox and chrome. Can you clear the cache and see if it works for you. Its not working on my mastodon instance but I think that is problem of my mastodon not a peertube’s issue.

Both working for me.

So what did you change? for me is working now as well :smiley: