feat: move amenities directory to RoomCategoriesPage + cdn.hotelsync.ru for uploads
- Remove "Справочник удобств" block from RoomsPage, add to RoomCategoriesPage - Fix RoomsPage imports (add Pencil back, remove unused amenity icons) - Update hint in CategoryForm to point to current page - Upload route now returns cdn.hotelsync.ru URLs instead of api.hotelsync.ru/uploads/ - Nginx config for cdn.hotelsync.ru (serves /opt/hotelsync/uploads directly) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,10 +31,8 @@ const upload: FastifyPluginAsync = async (fastify) => {
|
||||
|
||||
await pipeline(data.file, createWriteStream(filepath))
|
||||
|
||||
const host = (request.headers['x-forwarded-proto'] ?? 'https') + '://' +
|
||||
(request.headers['x-forwarded-host'] ?? request.headers.host ?? 'api.hotelsync.ru')
|
||||
|
||||
return { url: `${host}/uploads/${filename}` }
|
||||
const cdnHost = process.env.CDN_HOST ?? 'cdn.hotelsync.ru'
|
||||
return { url: `https://${cdnHost}/${filename}` }
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user