csrf use template func type

This commit is contained in:
kenneth
2023-12-04 08:03:41 +00:00
parent 91edab2f9b
commit f4ef8acb1f
9 changed files with 27 additions and 51 deletions

View File

@@ -4,7 +4,7 @@
<h1>登录</h1>
<div class="col-sm-4 py-md-5">
<form action="/login" method="post">
{{ .CSRFField }}
{{ csrfField }}
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">

View File

@@ -4,7 +4,7 @@
<h1>注册</h1>
<div class="col-sm-4 py-md-5">
<form action="/register" method="post">
{{ .CSRFField }}
{{ csrfField }}
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">

View File

@@ -7,7 +7,7 @@
</div>
<div class="col-sm-6 py-md-5 flex flex-column justify-content">
<form action="/me/videos/update" method="post">
{{ .CSRFField }}
{{ csrfField }}
{{if .ID}}
<div class="form-group">
<div class="input-group">

View File

@@ -36,7 +36,7 @@
</div>
{{end}}
<div class="hidden">
{{ .CSRFField }}
{{ csrfField }}
</div>
</div>
</div>