added CSRF
This commit is contained in:
parent
a06e8db2ff
commit
5c7d92f4f3
10 changed files with 42 additions and 6 deletions
|
@ -19,6 +19,7 @@
|
|||
<div class="card mb-4">
|
||||
<div class="text-right">
|
||||
<form action="/threads/{{.Thread.ID}}/{{.Post.ID}}" method="POST">
|
||||
{{.CSRF}}
|
||||
<textarea name="content" class="form-control border-0 border-bottom-1 p-3"
|
||||
placeholder="What are your thoughts?" rows="4"></textarea>
|
||||
<div class="border-top p-1">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
{{define "content"}}
|
||||
<form action=/threads/{{.Thread.ID}} method="POST">
|
||||
{{.CSRF}}
|
||||
<div class="form-group">
|
||||
<label>Title</label>
|
||||
<input name="title" type="text" class="form-control" placeholder="Give your post a great title">
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
</div>
|
||||
<div class="text-center">
|
||||
<form action=/threads/{{.Thread.ID}}/delete method="POST">
|
||||
{{.CSRF}}
|
||||
<button type="submit" class="text-danger btn-sm btn btn-link">Delete this thread</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
{{define "content"}}
|
||||
<form action="/threads" method="POST">
|
||||
{{.CSRF}}
|
||||
<div class="form-group">
|
||||
<label>Title</label>
|
||||
<input name="title" type="text" class="form-control" placeholder="Give your thread a great title">
|
||||
|
|
Reference in a new issue