From 5730858d688ece3a9bea2f4a3c0910c5d05a065d Mon Sep 17 00:00:00 2001 From: haoping Date: Thu, 16 Nov 2023 14:06:52 +0000 Subject: [PATCH] Fix internal links in workaround.mdx --- docs/pages/advanced/workaround.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/pages/advanced/workaround.mdx b/docs/pages/advanced/workaround.mdx index 5b45f6c6..9461e3d1 100644 --- a/docs/pages/advanced/workaround.mdx +++ b/docs/pages/advanced/workaround.mdx @@ -1,6 +1,6 @@ #### WORKAROUND: Create one cache behavior per top-level file and folder in `public/` (AWS specific) -As mentioned in the [Asset files](#asset-files) section, files in your app's `public/` folder are static and are uploaded to the S3 bucket. And requests for these files are handled by the S3 bucket, like so: +As mentioned in the [Asset files](./architecture#asset-files) section, files in your app's `public/` folder are static and are uploaded to the S3 bucket. And requests for these files are handled by the S3 bucket, like so: ``` https://my-nextjs-app.com/favicon.ico @@ -111,7 +111,7 @@ export function middleware(request: NextRequest) { #### WORKAROUND: `NextServer` does not set cache headers for HTML pages -As mentioned in the [Server function](#server-lambda-function) section, the server function uses the `NextServer` class from Next.js' build output to handle requests. However, `NextServer` does not seem to set the correct `Cache Control` headers. +As mentioned in the [Server function](./architecture#server-lambda-function) section, the server function uses the `NextServer` class from Next.js' build output to handle requests. However, `NextServer` does not seem to set the correct `Cache Control` headers. To work around the issue, the server function checks if the request is for an HTML page, and sets the `Cache Control` header to: @@ -154,7 +154,7 @@ You can build the file path like this: path.join(process.cwd(), "posts", "my-post.md"); ``` -As mentioned in the [Server function](#server-lambda-function) section, in a non-monorepo setup, the `server-function` bundle looks like: +As mentioned in the [Server function](./architecture#server-lambda-function) section, in a non-monorepo setup, the `server-function` bundle looks like: ``` .next/ @@ -201,4 +201,4 @@ Nextjs 13.4.13 refactored the middleware logic so that it no longer runs in the We've introduced a custom esbuild plugin to conditionally inject and override code to properly handle the breaking changes. The default request handler is in `adapters/plugins/default.ts` -When open-next needs to override that implementation due to NextJs breaking compatibility, the `createServerBundle` in `build.ts` determines the proper overrides to replace the code of the `default.ts` file. \ No newline at end of file +When open-next needs to override that implementation due to NextJs breaking compatibility, the `createServerBundle` in `build.ts` determines the proper overrides to replace the code of the `default.ts` file.