mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-05-21 23:16:47 +00:00
feat: enhance deployment and media handling
- Updated deployment configurations to disable Incremental Static Regeneration (ISR) and cache on demand pages for better performance control. - Extended .gitignore to include deployment-specific directories, preventing unnecessary files from being tracked. - Improved video handling in content by adding support for additional video types and enhancing video element attributes for better playback control. - Refactored post retrieval logic to ensure channel information is correctly merged and SEO data is accurately assigned. - Enhanced static file handling to include error handling and domain whitelisting for security and reliability.
This commit is contained in:
26
api/static/index.js
Normal file
26
api/static/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { GET } from '../../src/pages/static/[...url]'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge',
|
||||
}
|
||||
|
||||
export default function handler(request) {
|
||||
const url = request.url?.split('/static/')?.[1]
|
||||
|
||||
if (!url) {
|
||||
return new Response('Not Found', { status: 404 })
|
||||
}
|
||||
|
||||
const target = new URL(url)
|
||||
target.searchParams.delete('path')
|
||||
|
||||
return GET({
|
||||
request,
|
||||
params: {
|
||||
url: target.origin + target.pathname,
|
||||
},
|
||||
url: {
|
||||
search: target.search,
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user