diff --git a/src/bk-login/bklogin/authentication/urls.py b/src/bk-login/bklogin/authentication/urls.py index eba17690e..815143f29 100644 --- a/src/bk-login/bklogin/authentication/urls.py +++ b/src/bk-login/bklogin/authentication/urls.py @@ -9,6 +9,7 @@ specific language governing permissions and limitations under the License. """ from django.urls import path +from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import TemplateView from . import api_views, views @@ -17,7 +18,7 @@ # 登录入口 path("", views.LoginView.as_view()), # 登录小窗入口 - path("plain/", views.LoginView.as_view()), + path("plain/", xframe_options_exempt(views.LoginView.as_view())), # 前端页面(选择登录的用户) path("page/users/", TemplateView.as_view(template_name="index.html")), # ------------------------------------------ 租户 & 登录方式选择 ------------------------------------------ diff --git a/src/bk-user/bkuser/settings.py b/src/bk-user/bkuser/settings.py index a08d8f438..d7a120b39 100644 --- a/src/bk-user/bkuser/settings.py +++ b/src/bk-user/bkuser/settings.py @@ -199,8 +199,8 @@ BK_LOGIN_URL = env.str("BK_LOGIN_URL", default="/") # 登录小窗相关 BK_LOGIN_PLAIN_URL = env.str("BK_LOGIN_PLAIN_URL", default=BK_LOGIN_URL.rstrip("/") + "/plain/") -BK_LOGIN_PLAIN_WINDOW_WIDTH = env.int("BK_LOGIN_PLAIN_WINDOW_WIDTH", default=415) -BK_LOGIN_PLAIN_WINDOW_HEIGHT = env.int("BK_LOGIN_PLAIN_WINDOW_HEIGHT", default=415) +BK_LOGIN_PLAIN_WINDOW_WIDTH = env.int("BK_LOGIN_PLAIN_WINDOW_WIDTH", default=510) +BK_LOGIN_PLAIN_WINDOW_HEIGHT = env.int("BK_LOGIN_PLAIN_WINDOW_HEIGHT", default=510) # 登录回调地址参数Key BK_LOGIN_CALLBACK_URL_PARAM_KEY = env.str("BK_LOGIN_CALLBACK_URL_PARAM_KEY", default="c_url") # 登录API URL