Skip to content

Commit

Permalink
Merge branch 'master' into upgrade-admin-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
AtaliaRefua authored Oct 2, 2023
2 parents 7f0b807 + 10b2a72 commit fbd6a4b
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## [8.0.2](https://github.com/frontegg/frontegg-nextjs/compare/v8.0.1...v8.0.2) (2023-9-28)

### NextJS Wrapper 8.0.2:
- Revamped the security page in the Admin Portal

#### Note: no migration is needed to upgrade between versions 7 to 8.

# Change Log

## [8.0.1](https://github.com/frontegg/frontegg-nextjs/compare/v7.0.19...v8.0.1) (2023-9-27)

- Introduction of our new security page in the admin portal replacing the current security page.
Expand All @@ -8,9 +17,6 @@
NextJS Wrapper 8.0.1:
- FR-13274 - Fixed removed cookies in the pages directory for next-js version 13.4

#### Note: no migration is needed to upgrade between versions 7 to 8.


## [7.0.19](https://github.com/frontegg/frontegg-nextjs/compare/v7.0.18...v7.0.19) (2023-9-5)

- Releasing the new Security Center Page, which will replace the current Security Page. Currently exposed on Early Access with limited availability by a feature flag.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "8.0.1",
"version": "8.0.2",
"npmClient": "yarn",
"publishConfig": {
"registry": "https://registry.npmjs.org",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-app-directory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@frontegg/example-app-directory",
"version": "8.0.1",
"version": "8.0.2",
"private": true,
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf ./.next",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-pages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@frontegg/example-pages",
"version": "8.0.1",
"version": "8.0.2",
"private": true,
"scripts": {
"clean": "rm -rf ./node_modules && rm -rf ./.next",
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frontegg/nextjs",
"libName": "FronteggNextJs",
"version": "8.0.1",
"version": "8.0.2",
"author": "Frontegg LTD",
"license": "MIT",
"repository": {
Expand Down
16 changes: 15 additions & 1 deletion packages/nextjs/src/middleware/ProxyRequestCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const logger = fronteggLogger.child({ tag: 'FronteggApiMiddleware.ProxyRequestCa
const ProxyRequestCallback: ProxyReqCallback<ClientRequest, NextApiRequest> = (proxyReq, req) => {
try {
logger.info(`${req.url} | Going to proxy request`);
logger.info('The original req headers are', {headers: req.headers});
logger.debug(`${req.url} | parsing request cookies`);
const allCookies = CookieManager.parseCookieHeader(req);
logger.debug(`${req.url} | found ${allCookies} cookies`);
Expand All @@ -33,7 +34,20 @@ const ProxyRequestCallback: ProxyReqCallback<ClientRequest, NextApiRequest> = (p
proxyReq.setHeader('x-frontegg-framework', req.headers['x-frontegg-framework'] ?? `next@${NextJsPkg.version}`);
proxyReq.setHeader('x-frontegg-sdk', req.headers['x-frontegg-sdk'] ?? `@frontegg/nextjs@${sdkVersion.version}`);
proxyReq.setHeader('x-frontegg-middleware', 'true');
proxyReq.setHeader('accept-encoding', 'gzip, deflate, br');

const xForwardedFor = req.headers['x-forwarded-for'];
const xOriginalForwardedFor = req.headers['x-original-forwarded-for'];
const cfConnectionIp = req.headers['cf-connecting-ip'];

if (xForwardedFor) {
proxyReq.setHeader('x-forwarded-for', xForwardedFor);
}
if (xOriginalForwardedFor) {
proxyReq.setHeader('x-original-forwarded-for', xOriginalForwardedFor);
}
if (cfConnectionIp) {
proxyReq.setHeader('cf-connecting-ip', cfConnectionIp);
}

[
'x-invoke-path',
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/sdkVersion.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default { version: '8.0.1' };
export default { version: '8.0.2' };

0 comments on commit fbd6a4b

Please sign in to comment.