Skip to content

Commit

Permalink
Merge pull request #135 from serafuku/yunochi/develop
Browse files Browse the repository at this point in the history
🩹 캐시 설정 수정
  • Loading branch information
yunochi authored Dec 24, 2024
2 parents 1449eee + b4c087d commit 82cd0e7
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const nextConfig: NextConfig = {
forceSwcTransforms: true,
},
serverExternalPackages: ['re2'],
headers: async () => {
return [
{ source: '/static/:slug*', headers: [{ key: 'Cache-Control', value: 'public, max-age=31234567, immutable' }] },
];
},
};

export default nextConfig;
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/app/api/web/proxy/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class RemoteImageProxy {
...(content_length ? { 'content-length': content_length } : {}),
'Content-Type': content_type,
'Content-Disposition': content_disposition,
'Cache-Control': 'public, max-age=31536000',
'Cache-Control': 'public, max-age=31536000, immutable',
...(last_modified ? { 'last-modified': last_modified } : {}),
...(etag ? { etag: etag } : {}),
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function RootLayout({
{children}
<div className="fixed top-0 left-0 bg-transparent w-[100vw] h-[100vh] -z-10">
<Image
src={`/${randomNumber}.gif`}
src={`/static/${randomNumber}.gif`}
alt="App Background"
fill={true}
unoptimized
Expand Down
2 changes: 1 addition & 1 deletion src/app/mastodon-callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function CallbackPage() {
return (
<>
<div className="w-full h-[100vh] flex flex-col gap-2 justify-center items-center text-3xl">
<Image src={`/loading/${id}.gif`} width={64} height={64} alt="Login Loading" unoptimized />
<Image src={`/static/loading/${id}.gif`} width={64} height={64} alt="Login Loading" unoptimized />
<span>로그인하고 있어요...</span>
</div>
<DialogModalOneButton
Expand Down
2 changes: 1 addition & 1 deletion src/app/misskey-callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function CallbackPage() {
return (
<>
<div className="w-full h-[100vh] flex flex-col gap-2 justify-center items-center text-3xl">
<Image src={`/loading/${id}.gif`} width={64} height={64} alt="Login Loading" unoptimized />
<Image src={`/static/loading/${id}.gif`} width={64} height={64} alt="Login Loading" unoptimized />
<span>로그인하고 있어요...</span>
</div>
<DialogModalOneButton
Expand Down

0 comments on commit 82cd0e7

Please sign in to comment.