mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Add setAuthServerUrl().
This commit is contained in:
parent
277dec0af3
commit
9b45e5fe43
@ -32,6 +32,7 @@ import HomePage from "./basic/HomePage";
|
||||
import CustomGithubCorner from "./CustomGithubCorner";
|
||||
|
||||
import Face from "./auth/Face";
|
||||
import * as Auth from "./auth/AuthBackend";
|
||||
import * as AuthBackend from "./auth/AuthBackend";
|
||||
import AuthCallback from "./auth/AuthCallback";
|
||||
|
||||
@ -47,6 +48,7 @@ class App extends Component {
|
||||
};
|
||||
|
||||
Setting.initServerUrl();
|
||||
Auth.setAuthServerUrl(Setting.ServerUrl);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
@ -17,7 +17,6 @@ import React from "react";
|
||||
import {isMobile as isMobileDevice} from "react-device-detect";
|
||||
|
||||
export let ServerUrl = "";
|
||||
export let ClientUrl = "";
|
||||
|
||||
export function initServerUrl() {
|
||||
const hostname = window.location.hostname;
|
||||
|
@ -12,9 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import * as Setting from "../Setting";
|
||||
let ServerUrl = "https://door.casbin.com";
|
||||
|
||||
const ServerUrl = Setting.ServerUrl;
|
||||
export function setAuthServerUrl(serverUrl) {
|
||||
ServerUrl = serverUrl;
|
||||
}
|
||||
|
||||
export function getAccount() {
|
||||
return fetch(`${ServerUrl}/api/get-account`, {
|
||||
|
@ -29,3 +29,7 @@ code {
|
||||
.ant-list-sm .ant-list-item {
|
||||
padding: 2px !important;
|
||||
}
|
||||
|
||||
.ant-layout-header {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user