在同一頁面中的導軌4的應用程序上我在頭一個Rails的authenticity_token形式VS CSRF令牌
:
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="some_token" />
及以下正文:
<form action="/someaction" method="post">
<input name="utf8" type="hidden" value="✓" />
<input type="hidden" name="_method" value="patch" />
<input type="hidden" name="authenticity_token" value="another_token" />
js調用需要csrf標記。但爲什麼表單標記與csrf標記不同?在表單提交中使用哪兩個令牌?
謝謝。我需要一些時間來看答案並理解它。 – thebravoman
@thebravoman它對您有幫助嗎? –
就是這樣,我只需要用我的應用程序測試幾件事就可以完全理解它 – thebravoman