Skip to content

Commit

Permalink
Merge pull request #1441 from b1ngsha/develop
Browse files Browse the repository at this point in the history
fix: 修复csrf token鉴权问题 --story=119892878
  • Loading branch information
benero authored Oct 16, 2024
2 parents adfca96 + 5f13465 commit 833ec9d
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 833ec9d

Please sign in to comment.