beta test realise
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-11-08 20:54:06 +09:00
parent 9c1c5b4b62
commit b1bcd85644
2 changed files with 10 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
from django.contrib import admin
from django.urls import path, include
from django.urls import path, include, re_path
from django.conf import settings
from django.conf.urls.static import static
from .media_views import MediaFileView
urlpatterns = [
@@ -11,11 +12,11 @@ urlpatterns = [
path('users/', include('users.urls')), # User management app
path('links/', include('links.urls')), # Link management app
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
# Кастомный view для обслуживания медиа файлов в production
re_path(r'^storage/(?P<file_path>.*)$', MediaFileView.as_view(), name='media'),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Summary of API Endpoints:
# POST /api/auth/register/ - Register new user

View File

@@ -20,6 +20,11 @@ const nextConfig = {
port: '8000', // where Django serves media
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
},
{
protocol: 'https',
hostname: 'links.shareon.kr',
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
},
],
},