Skip to content

chore: add next rewrite config for dev api #20099

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeeeeeeM
Copy link
Contributor

@LeeeeeeM LeeeeeeM commented May 22, 2025

Summary

Project config upgrade

just rewrite api for dev env.

Screenshots

Before After
x image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 22, 2025
@LeeeeeeM
Copy link
Contributor Author

@crazywoola CC

for developer's experience

@crazywoola crazywoola requested a review from Copilot May 23, 2025 02:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a development API rewrite configuration to enable rewriting of API routes when running in a non-production environment.

  • Added an asynchronous rewrites function in web/next.config.js to route API calls based on a custom environment variable.
  • Updated web/.env.example to include the base URL for the development API proxy.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
web/next.config.js Added async rewrites function for development API routing
web/.env.example Added NEXT_DEV_API_PROXY_BASE_URL variable for the dev API endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy