Skip to content

Commit

Permalink
Fix internal links in workaround.mdx (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
caaatisgood authored Nov 18, 2023
1 parent 2b2880a commit 5acd30d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/pages/advanced/workaround.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -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.
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.

1 comment on commit 5acd30d

@vercel
Copy link

@vercel vercel bot commented on 5acd30d Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

open-next – ./

open-next.vercel.app
open-next-sst-dev.vercel.app
open-next-git-main-sst-dev.vercel.app

Please sign in to comment.