SSO 地址去掉 /cas 前缀:context-path 改为根路径,登录地址 /cas/login 变为 /login
build / build-push (push) Successful in 3m33s

This commit is contained in:
2026-09-03 22:28:28 +08:00
parent 229067d518
commit 6ceaed63d6
12 changed files with 57 additions and 37 deletions
@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<title>请稍候</title>
<link rel="icon" type="image/x-icon" href="/cas/front/image/favicon.ico?v=1" />
<link rel="icon" type="image/x-icon" href="/front/image/favicon.ico?v=1" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
@@ -12,17 +12,17 @@
<body>
<!--
覆盖 CAS 原生 casGenericSuccessView.html:已有有效 TGT 后再访问 /cas/login(无 service)
覆盖 CAS 原生 casGenericSuccessView.html:已有有效 TGT 后再访问 /login(无 service)
时,CAS 不再渲染默认"您已经成功登录中央认证系统"页,而是自动跳转到配置的默认落点
(custom.login.default-redirect-url,即 base.yunhaixingtong.com)。
跳转地址复用 /cas/api/check-sso 的返回(跟随 Nacos 配置,不硬编码);接口异常时兜底。
跳转地址复用 /api/check-sso 的返回(跟随 Nacos 配置,不硬编码);接口异常时兜底。
-->
<script>
(function () {
var fallback = "https://base.yunhaixingtong.com";
try {
var xhr = new XMLHttpRequest();
xhr.open("GET", "/cas/api/check-sso", true);
xhr.open("GET", "/api/check-sso", true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) return;
try {