-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(vercel): try to fix the vercel cors issue
- Loading branch information
Showing
4 changed files
with
285 additions
and
302 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Base api | ||
# Remeber to change this to your production server address | ||
# Here I used my mock server for this project | ||
VUE_APP_BASE_API = 'https://vue-typescript-admin-mock-server.armour.now.sh/mock-api/v1/' | ||
VUE_APP_BASE_API = 'https://vue-typescript-admin-mock-server-armour.vercel.app/mock-api/v1/' |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ const userList: IUserData[] = [ | |
introduction: 'I am a super administrator', | ||
email: '[email protected]', | ||
phone: '1234567890', | ||
roles: ['admin'], | ||
roles: ['admin'] | ||
}, | ||
{ | ||
id: 1, | ||
|
@@ -23,7 +23,7 @@ const userList: IUserData[] = [ | |
introduction: 'I am an editor', | ||
email: '[email protected]', | ||
phone: '1234567890', | ||
roles: ['editor'], | ||
roles: ['editor'] | ||
} | ||
] | ||
const userCount = 100 | ||
|
@@ -91,7 +91,7 @@ export const getUserInfo = (req: Request, res: Response) => { | |
return res.json({ | ||
code: 20000, | ||
data: { | ||
user: req.header('X-Access-Token') == 'admin-token' ? userList[0] : userList[1] | ||
user: req.header('X-Access-Token') === 'admin-token' ? userList[0] : userList[1] | ||
} | ||
}) | ||
} | ||
|
Oops, something went wrong.