mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
refactor: update locale middleware and OG image route configuration
This commit is contained in:
parent
265af27a1c
commit
c5ea54792b
@ -2,6 +2,8 @@ import { getPost } from "@/lib/ghost";
|
||||
import { generateOGImage } from "@/lib/og-image";
|
||||
import type { NextRequest } from "next/server";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const { searchParams } = new URL(request.url);
|
||||
|
@ -2,10 +2,10 @@ import createMiddleware from "next-intl/middleware";
|
||||
|
||||
export default createMiddleware({
|
||||
locales: ["en", "fr", "zh-Hans"],
|
||||
|
||||
// Used when no locale matches
|
||||
defaultLocale: "en",
|
||||
localePrefix: "always",
|
||||
// Excluir la ruta de la API de OG images
|
||||
localeDetection: true,
|
||||
localePrefix: "as-needed",
|
||||
});
|
||||
|
||||
export const config = {
|
||||
|
Loading…
Reference in New Issue
Block a user