Skip to content

Commit 5d16dc9

Browse files
authored
Merge branch 'main' into ep/next-auth-support
2 parents 0833505 + 10291d1 commit 5d16dc9

File tree

7 files changed

+21
-53
lines changed

7 files changed

+21
-53
lines changed

.github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
registry-url: 'https://registry.npmjs.org'
2828
if: ${{ steps.release.outputs.releases_created }}
2929
- name: Install dependencies
30-
run: npm ci
30+
run: CI=1 npm ci
3131
working-directory: plugin
3232
if: ${{ steps.release.outputs.releases_created }}
3333
- run: npm publish

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"plugin": "4.4.2"
2+
"plugin": "4.4.3"
33
}

demos/middleware/pages/index.js

+2-48
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Head from 'next/head'
2-
import Image from 'next/image'
2+
import Link from 'next/link'
33
import styles from '../styles/Home.module.css'
44

55
export default function Home() {
@@ -16,54 +16,8 @@ export default function Home() {
1616
Welcome to <a href="https://nextjs.org">Next.js!</a>
1717
</h1>
1818

19-
<p className={styles.description}>
20-
Get started by editing{' '}
21-
<code className={styles.code}>pages/index.js</code>
22-
</p>
23-
24-
<div className={styles.grid}>
25-
<a href="https://nextjs.org/docs" className={styles.card}>
26-
<h2>Documentation &rarr;</h2>
27-
<p>Find in-depth information about Next.js features and API.</p>
28-
</a>
29-
30-
<a href="https://nextjs.org/learn" className={styles.card}>
31-
<h2>Learn &rarr;</h2>
32-
<p>Learn about Next.js in an interactive course with quizzes!</p>
33-
</a>
34-
35-
<a
36-
href="https://github.com/vercel/next.js/tree/canary/examples"
37-
className={styles.card}
38-
>
39-
<h2>Examples &rarr;</h2>
40-
<p>Discover and deploy boilerplate example Next.js projects.</p>
41-
</a>
42-
43-
<a
44-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
45-
className={styles.card}
46-
>
47-
<h2>Deploy &rarr;</h2>
48-
<p>
49-
Instantly deploy your Next.js site to a public URL with Vercel.
50-
</p>
51-
</a>
52-
</div>
19+
<p><Link href="/shows/rewriteme">Rewrite me</Link></p>
5320
</main>
54-
55-
<footer className={styles.footer}>
56-
<a
57-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
58-
target="_blank"
59-
rel="noopener noreferrer"
60-
>
61-
Powered by{' '}
62-
<span className={styles.logo}>
63-
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
64-
</span>
65-
</a>
66-
</footer>
6721
</div>
6822
)
6923
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const Show = () => {
2+
return (
3+
<div>
4+
<p>This should have been rewritten</p>
5+
</div>
6+
)
7+
}
8+
9+
export default Show

plugin/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### [4.4.3](https://github.com/netlify/netlify-plugin-nextjs/compare/plugin-nextjs-v4.4.2...plugin-nextjs-v4.4.3) (2022-04-25)
4+
5+
6+
### Bug Fixes
7+
8+
* pass x-middleware-rewrite header to client ([#1322](https://github.com/netlify/netlify-plugin-nextjs/issues/1322)) ([ed17658](https://github.com/netlify/netlify-plugin-nextjs/commit/ed176586916aef892d3c126e10ac0e0b97875510))
9+
310
### [4.4.2](https://github.com/netlify/netlify-plugin-nextjs/compare/plugin-nextjs-v4.4.1...plugin-nextjs-v4.4.2) (2022-04-19)
411

512

plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netlify/plugin-nextjs",
3-
"version": "4.4.2",
3+
"version": "4.4.3",
44
"description": "Run Next.js seamlessly on Netlify",
55
"main": "lib/index.js",
66
"files": [

plugin/src/templates/edge/utils.ts

-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ export const buildResponse = async ({
3333
request.headers.set('x-nf-next-middleware', 'skip')
3434
const rewrite = res.headers.get('x-middleware-rewrite')
3535
if (rewrite) {
36-
res.headers.delete('x-middleware-rewrite')
3736
return addMiddlewareHeaders(context.rewrite(rewrite), res)
3837
}
3938
if (res.headers.get('x-middleware-next') === '1') {
40-
res.headers.delete('x-middleware-next')
4139
return addMiddlewareHeaders(context.next(), res)
4240
}
4341
return res

0 commit comments

Comments
 (0)