Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nextjs] Healthz shows page not found for multisite setup #1443

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Conversation

illiakovalenko
Copy link
Contributor

@illiakovalenko illiakovalenko commented Apr 21, 2023

Description / Motivation

When you request the specific route the execution order is:

  • headers from next.config.js
  • redirects from next.config.js
  • middleware
  • rewrites from next.config.js

because of that it's required to exclude /healthz from middleware execution, otherwise next config rewrite is not executed

Testing Details

  • Unit Test Added
  • Manual Test/Other - Scaffoled nextjs, nextjs-styleguide, nextjs-multisite app. Started in connected mode and opened /healthz route. Response is { code: 200, message: "Healthy" }

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

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

👍

@ambrauer ambrauer merged commit 6213585 into dev Apr 21, 2023
@ambrauer ambrauer deleted the bugfix/581170 branch April 21, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants