set backend and version env
This commit is contained in:
@@ -15,7 +15,7 @@ import renderMd from './Markdown';
|
||||
|
||||
export { format_time, Time, TitleLine };
|
||||
|
||||
export const API_BASE = '/_api/v1';
|
||||
export const API_BASE = `${process.env.REACT_APP_BACKEND || '/'}_api/v1`;
|
||||
|
||||
// https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
|
||||
function escape_regex(string) {
|
||||
|
||||
@@ -82,7 +82,9 @@ class LoginPopupSelf extends Component {
|
||||
<b>通过第三方验证登陆新T树洞</b>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/_login?p=cs" target="_blank">
|
||||
<a href={(process.env.REACT_APP_BACKEND || '/') + "_login?p=cs"} target="_blank"
|
||||
referrerPolicy="origin"
|
||||
>
|
||||
<span className="icon icon-login" />
|
||||
闭社
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user