Skip to content

Commit

Permalink
fix(bklogin): xframe for plain login (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 authored Nov 17, 2023
1 parent 6bb768c commit 989990a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/bk-login/bklogin/authentication/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")),
# ------------------------------------------ 租户 & 登录方式选择 ------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/bk-user/bkuser/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 989990a

Please sign in to comment.