mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
fix: swagger bug in dev mode (#291)
Signed-off-by: sh1luo <690898835@qq.com>
This commit is contained in:
parent
c70c62f52e
commit
52d9017611
@ -350,7 +350,7 @@ class App extends Component {
|
||||
|
||||
res.push(
|
||||
<Menu.Item key="/swagger">
|
||||
<a target="_blank" rel="noreferrer" href={"/swagger"}>
|
||||
<a target="_blank" rel="noreferrer" href={Setting.isLocalhost ? `${Setting.ServerUrl}/swagger` : "/swagger"}>
|
||||
{i18next.t("general:Swagger")}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
|
@ -43,7 +43,7 @@ export function initServerUrl() {
|
||||
}
|
||||
}
|
||||
|
||||
function isLocalhost() {
|
||||
export function isLocalhost() {
|
||||
const hostname = window.location.hostname;
|
||||
return hostname === "localhost";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user