feat(tkds): 독립 대시보드 서비스 분리 (tkds.technicalkorea.net)
대시보드를 gateway(tkfb)에서 분리하여 독립 서비스 tkds로 이동. - tkds/web: nginx + dashboard.html 신규 서비스 (port 30780) - gateway: /login 복원, /dashboard → tkds 301 리다이렉트 - 전체 시스템 getLoginUrl() → tkds.technicalkorea.net/dashboard로 변경 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,10 +52,10 @@ if ('caches' in window) {
|
||||
window.getLoginUrl = function() {
|
||||
var hostname = window.location.hostname;
|
||||
if (hostname.includes('technicalkorea.net')) {
|
||||
return window.location.protocol + '//tkfb.technicalkorea.net/login?redirect=' + encodeURIComponent(window.location.href);
|
||||
return window.location.protocol + '//tkds.technicalkorea.net/dashboard?redirect=' + encodeURIComponent(window.location.href);
|
||||
}
|
||||
// 개발 환경: 게이트웨이 SSO 로그인 페이지
|
||||
return '/login?redirect=' + encodeURIComponent(window.location.href);
|
||||
// 개발 환경: tkds 포트 (30780)
|
||||
return window.location.protocol + '//' + hostname + ':30780/dashboard?redirect=' + encodeURIComponent(window.location.href);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,8 +16,8 @@ function getToken() { return _cookieGet('sso_token') || localStorage.getItem('ss
|
||||
function getLoginUrl() {
|
||||
const h = location.hostname;
|
||||
const t = Date.now();
|
||||
if (h.includes('technicalkorea.net')) return location.protocol + '//tkfb.technicalkorea.net/login?redirect=' + encodeURIComponent(location.href) + '&_t=' + t;
|
||||
return location.protocol + '//' + h + ':30000/login?redirect=' + encodeURIComponent(location.href) + '&_t=' + t;
|
||||
if (h.includes('technicalkorea.net')) return location.protocol + '//tkds.technicalkorea.net/dashboard?redirect=' + encodeURIComponent(location.href) + '&_t=' + t;
|
||||
return location.protocol + '//' + h + ':30780/dashboard?redirect=' + encodeURIComponent(location.href) + '&_t=' + t;
|
||||
}
|
||||
function decodeToken(t) { try { const b = atob(t.split('.')[1].replace(/-/g,'+').replace(/_/g,'/')); return JSON.parse(new TextDecoder().decode(Uint8Array.from(b, c => c.charCodeAt(0)))); } catch { return null; } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user