|
1 | 1 | #### WORKAROUND: Create one cache behavior per top-level file and folder in `public/` (AWS specific)
|
2 | 2 |
|
3 |
| -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: |
| 3 | +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: |
4 | 4 |
|
5 | 5 | ```
|
6 | 6 | https://my-nextjs-app.com/favicon.ico
|
@@ -111,7 +111,7 @@ export function middleware(request: NextRequest) {
|
111 | 111 |
|
112 | 112 | #### WORKAROUND: `NextServer` does not set cache headers for HTML pages
|
113 | 113 |
|
114 |
| -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. |
| 114 | +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. |
115 | 115 |
|
116 | 116 | To work around the issue, the server function checks if the request is for an HTML page, and sets the `Cache Control` header to:
|
117 | 117 |
|
@@ -154,7 +154,7 @@ You can build the file path like this:
|
154 | 154 | path.join(process.cwd(), "posts", "my-post.md");
|
155 | 155 | ```
|
156 | 156 |
|
157 |
| -As mentioned in the [Server function](#server-lambda-function) section, in a non-monorepo setup, the `server-function` bundle looks like: |
| 157 | +As mentioned in the [Server function](./architecture#server-lambda-function) section, in a non-monorepo setup, the `server-function` bundle looks like: |
158 | 158 |
|
159 | 159 | ```
|
160 | 160 | .next/
|
@@ -201,4 +201,4 @@ Nextjs 13.4.13 refactored the middleware logic so that it no longer runs in the
|
201 | 201 | We've introduced a custom esbuild plugin to conditionally inject and override code to properly handle the breaking changes.
|
202 | 202 |
|
203 | 203 | The default request handler is in `adapters/plugins/default.ts`
|
204 |
| -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. |
| 204 | +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. |
0 commit comments