forked from apitable/apitable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: web-server local start axios base url (apitable#155)
Submit a pull request for this project. <!-- If you have an Issue that related to this Pull Request, you can copy this Issue's description --> # Why? <!-- > Related to which issue? > Why we need this pull request? > What is the user story for this pull request? --> # What? <!-- > Can you describe this feature in detail? > Who can benefit from it? --> # How? <!-- > Do you have a simple description of how this pull request is implemented? -->
- Loading branch information
1 parent
31d0fb1
commit 1e10f51
Showing
5 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Url } from '@apitable/core'; | ||
import { NextPageContext } from 'next'; | ||
|
||
export const getBaseUrl = (context: NextPageContext) => { | ||
const host = process.env.API_PROXY || `http://${context.req?.headers.host}` || ''; | ||
return host + Url.BASE_URL; | ||
} |