diff --git a/feed_scraper/video_scraper.py b/feed_scraper/video_scraper.py index 759b5d7..e351dc9 100644 --- a/feed_scraper/video_scraper.py +++ b/feed_scraper/video_scraper.py @@ -176,7 +176,7 @@ def fetch_feed(feed, force_refetch, max_per_feed=200): article_kwargs["full_text_html"] = f"""
\n
{article_kwargs["extract"]}
""" diff --git a/news_platform/settings.py b/news_platform/settings.py index 039fa14..6b5cf5c 100644 --- a/news_platform/settings.py +++ b/news_platform/settings.py @@ -41,6 +41,7 @@ CSRF_TRUSTED_ORIGINS = HOSTS ALLOWED_HOSTS = [urlparse(url).netloc for url in HOSTS] CORS_ALLOWED_ORIGINS = HOSTS +X_FRAME_OPTIONS = "ALLOW-FROM " + MAIN_HOST if (sentry_sdk_url := os.environ.get("SENTRY_URL", None)) is not None: sentry_sdk.init( diff --git a/news_platform/urls.py b/news_platform/urls.py index b586afc..b3cdf41 100644 --- a/news_platform/urls.py +++ b/news_platform/urls.py @@ -17,6 +17,7 @@ from django.contrib import admin from django.contrib.auth.views import LogoutView +from django.views.generic import TemplateView from django.urls import include, path from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView @@ -59,6 +60,7 @@ def trigger_error(request): path("view//", articleView, name="view_article"), path("redirect//", RedirectView, name="redirect_article"), path("img-error//", ImageErrorView, name="image_error"), + path("youtube-proxy/", TemplateView.as_view(template_name="youtube-proxy.html"), name="youtube_proxy"), path("", homeView, name="home"), path("auth/", include("djoser.urls")), path("auth/", include("djoser.urls.jwt")), diff --git a/templates/youtube-proxy.html b/templates/youtube-proxy.html new file mode 100644 index 0000000..dc13f36 --- /dev/null +++ b/templates/youtube-proxy.html @@ -0,0 +1,83 @@ + + + + + + + + YouTube Video + + + + + + + \ No newline at end of file