Skip to content

Commit

Permalink
fix: update Content Security Policy and improve styling in Profile co…
Browse files Browse the repository at this point in the history
…mponent; refactor SyncPlugin to ensure correct tmdb_id handling
  • Loading branch information
StoneyEagle committed Feb 4, 2025
1 parent afb30ee commit 85c1d89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .server_config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
listen 443 80;
index index.html Index.html;
add_header Content-Security-Policy-Report-Only "";
add_header Content-Security-Policy "frame-src 'self' https://nomercy.tv https://*.nomercy.tv:* https://auth-dev.nomercy.tv https://auth-dev.nomercy.tv/* https://www.youtube.com; worker-src 'self' blob:; connect-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv:* https://*.nomercy.tv https://*.spotify.com/* https://image.tmdb.org https://api.themoviedb.org https://www.last.fm ws://*.nomercy.tv:* ws://192.168.2.201:* wss://*.nomercy.tv:* wss://127.0.0.1:* wss://localhost:* https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev https://raw.githubusercontent.com; font-src 'self' blob: data: https://cdn.nomercy.tv https://cdn-dev.nomercy.tv; img-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv:* https://*.nomercy.tv https://*.spotify.com/* https://*.archive.org https://archive.org https://coverartarchive.org https://i.ytimg.com https://image.tmdb.org https://media.themoviedb.org https://lastfm.freetls.fastly.net https://images.fanart.tv https://assets.fanart.tv https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev wss://*.nomercy.tv:*; media-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv https://*.nomercy.tv:* wss://*.nomercy.tv:* https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev; object-src 'self' blob:; script-src 'self' 'unsafe-eval' 'unsafe-inline' 'unsafe-hashes' https://www.youtube.com https://nomercy.tv https://*.nomercy.tv https://vscode.nomercy.tv https://trailer.nomercy.tv https://*.nomercy.tv:* https://cdn.jsdelivr.net/npm/[email protected]/parser.min.js https://www.gstatic.com 'sha256-G3Q1p4s6LacltrOf4BnWiwdl1rEp+mmS6DwpXr5fjKg=' 'sha256-VA8O2hAdooB288EpSTrGLl7z3QikbWU9wwoebO/QaYk=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' 'sha256-XC/gbdknUrCiLbZdZ8y96M9KVODooJYGbxrY7P+a1Rg=' https://static.cloudflareinsights.com 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY='; style-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.nomercy.tv https://cdn-dev.nomercy.tv https://storage.nomercy.tv; base-uri 'self';";
add_header Content-Security-Policy "frame-src 'self' https://nomercy.tv https://*.nomercy.tv:* https://auth-dev.nomercy.tv https://auth-dev.nomercy.tv/* https://www.youtube.com; worker-src 'self' blob:; connect-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv:* https://*.nomercy.tv https://*.spotify.com/* https://image.tmdb.org https://api.themoviedb.org https://www.last.fm ws://*.nomercy.tv:* ws://192.168.2.201:* wss://*.nomercy.tv:* wss://127.0.0.1:* wss://localhost:* https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev https://raw.githubusercontent.com; font-src 'self' blob: data: https://cdn.nomercy.tv https://cdn-dev.nomercy.tv; img-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv:* https://*.nomercy.tv https://*.spotify.com/* https://*.archive.org https://archive.org https://coverartarchive.org https://i.ytimg.com https://image.tmdb.org https://media.themoviedb.org https://lastfm.freetls.fastly.net https://images.fanart.tv https://assets.fanart.tv https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev wss://*.nomercy.tv:*; media-src 'self' blob: data: https://nomercy.tv https://*.nomercy.tv https://*.nomercy.tv:* wss://*.nomercy.tv:* https://pub-a68768bb5b1045f296df9ea56bd53a7f.r2.dev; object-src 'self' blob:; script-src 'self' 'unsafe-eval' 'unsafe-inline' 'unsafe-hashes' https://www.youtube.com https://nomercy.tv https://*.nomercy.tv https://vscode.nomercy.tv https://trailer.nomercy.tv https://*.nomercy.tv:* https://cdn.jsdelivr.net/npm/[email protected]/parser.min.js https://www.gstatic.com 'sha256-G3Q1p4s6LacltrOf4BnWiwdl1rEp+mmS6DwpXr5fjKg=' 'sha256-VA8O2hAdooB288EpSTrGLl7z3QikbWU9wwoebO/QaYk=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' 'sha256-XC/gbdknUrCiLbZdZ8y96M9KVODooJYGbxrY7P+a1Rg=' https://static.cloudflareinsights.com 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY=' 'sha256-eQuPjK9gyGgVdG8wOb8JD6hWUvJKo06S/x1cBPdeTdY='; style-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.nomercy.tv https://cdn-dev.nomercy.tv https://storage.nomercy.tv; base-uri 'self';";
add_header Report-To "";
add_header Referrer-Policy "strict-origin-when-cross-origin";

Expand Down
4 changes: 3 additions & 1 deletion src/lib/VideoPlayer/plugins/syncPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ export class SyncPlugin extends Plugin {

let specialId: string | undefined;
let collectionId: number | undefined;
let tmdbId: number | undefined = current?.tmdb_id;
if (route.at(-3) === 'specials') {
specialId = route.at(-2) as string;
} else if (route.at(-3) === 'collection') {
collectionId = route.at(-2) as unknown as number;
tmdbId = current.id as unknown as number;
}

return {
video_id: current?.video_id,
tmdb_id: current?.tmdb_id,
tmdb_id: tmdbId,
playlist_type: route.at(-3),
special_id: specialId,
collection_id: collectionId,
Expand Down
2 changes: 1 addition & 1 deletion src/views/Preferences/Profile/Mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const description = "Upload an image of max {{dimension}} pixels and {{size}} in
{{ $t('Upload image') }}
</Button>

<p class="self-stretch flex-grow-0 flex-shrink-0 w-full text-sm text-left text-[#9ba1a6] whitespace-pre-line">
<p class="self-stretch flex-grow-0 flex-shrink-0 w-full text-sm text-left text-[#9ba1a6] text-pretty">
{{ $t(description, {
dimension: '2000x2000',
size: '2MB',
Expand Down

0 comments on commit 85c1d89

Please sign in to comment.