/sso/logout 接口 self 格式设置响应头,以适配 solon 下集成 sso 插件可以正常跳转路径

This commit is contained in:
click33
2024-05-11 15:56:56 +08:00
parent 54114ebac6
commit dd533fba8e
3 changed files with 2 additions and 51 deletions

View File

@@ -47,6 +47,7 @@ public class SaSsoProcessorHelper {
String back = req.getParam(paramName.back);
if(SaFoxUtil.isNotEmpty(back)) {
if(back.equals(SaSsoConsts.SELF)) {
res.setHeader("Content-Type", "text/html; charset=utf-8");
return "<script>if(document.referrer != location.href){ location.replace(document.referrer || '/'); }</script>";
}
return res.redirect(back);