first commit

This commit is contained in:
Rutra committed 2026-10-12 14:25:22 +02:00
commit 3c0479faf0
169 files changed
+27617

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { defineConfig } from '@adonisjs/static'
/**
* Serves the Angular build copied in "public/". The bundles have a hash
* in their name and can be cached forever, index.html must not be cached.
*
* https://docs.adonisjs.com/guides/static-assets
*/
const staticServerConfig = defineConfig({
enabled: true,
etag: true,
lastModified: true,
dotFiles: 'ignore',
headers: (path) => {
if (/(^|[\\/])(main|chunk|styles|polyfills)-[\w-]{8,}\.(js|css)$/.test(path)) {
return { 'Cache-Control': 'public, max-age=31536000, immutable' }
}
return { 'Cache-Control': 'no-cache' }
},
})
export default staticServerConfig