Skip to content

Commit

Permalink
fix: 修复csrf token鉴权问题 --story=119892878
Browse files Browse the repository at this point in the history
  • Loading branch information
cheynechen committed Oct 16, 2024
1 parent 9b7aba2 commit 5f13465
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipeline/contrib/engine_admin/templates/eri_admin_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var BK_STATIC_URL = '{{BK_STATIC_URL}}/'
var REMOTE_STATIC_URL = ''
var APP_CODE = '{{APP_CODE}}'
var CSRF_TOKEN_NAME = '{{ BKAPP_CSRF_COOKIE_NAME }}'
</script>
<script>
var pathname = window.location.pathname
Expand All @@ -20,6 +21,7 @@
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
return (arr = document.cookie.match(reg)) ? unescape(arr[2]) : null;
}
window.BKAPP_CSRF_COOKIE_NAME = CSRF_TOKEN_NAME
</script>
<script type="text/javascript" src="{% static 'js/runtime.114327c.js' %}"></script><script type="text/javascript" src="{% static 'js/vue-lib.dc44a51.js' %}"></script><script type="text/javascript" src="{% static 'js/app.0a38c7a.js' %}"></script></body>
</html>

0 comments on commit 5f13465

Please sign in to comment.