Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #155 from longguikeji/dev/pl-add
Browse files Browse the repository at this point in the history
fix: 🐛 fix baseurl request
  • Loading branch information
longgui-penglei authored Jul 1, 2021
2 parents 69e246d + 5b8466a commit bc74a71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/login/request/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import axios from 'axios'
import LoginStore from '../store/login'

const request = axios.create({
baseURL: LoginStore.host,
withCredentials: true,
validateStatus: (status) => {
return /^(2|3)\d{2}$/.test(String(status))
Expand Down
2 changes: 1 addition & 1 deletion src/utils/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const RULE_REGEXP = {
'^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
'i',
),
other: /[<>"'()&/ ]/gi,
other: /[<>"'()&/ ]/gi, // <>"'()&/ 可以增加字符的控制,目前包含 小括号 尖括号 单引号 双引号 &符 /斜线符 空格
path: /^(?!.\/|..\/).*/
}

Expand Down

0 comments on commit bc74a71

Please sign in to comment.