Added CSRF.
This commit is contained in:
parent
1f258ea17e
commit
60d434a922
4 changed files with 14 additions and 0 deletions
3
views/components/forms.gohtml
Normal file
3
views/components/forms.gohtml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{{define "csrf"}}
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}"/>
|
||||
{{end}}
|
||||
|
|
@ -3,5 +3,6 @@
|
|||
<label for="message">Message</label>
|
||||
<textarea id="message"></textarea>
|
||||
<input type="submit" value="Send"/>
|
||||
{{template "csrf" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue