# Protect\_from\_forgery and search engines

**URL:** <https://www.ruby-forum.com/t/protect-from-forgery-and-search-engines/140413>\
**Category:** Rails\
**Created:** [June 13, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/protect-from-forgery-and-search-engines/140413 "2008-06-13T17:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@harm](https://www.ruby-forum.com/u/harm)\
**Post date:** [June 13, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/protect-from-forgery-and-search-engines/140413/1 "2008-06-13T17:42:46Z")

</div>

Dear all,

I’m using protect\_from\_forgery on my site but this prevents search  
engines from GETing some pages as protect\_from\_forgery requires a  
session to be present.The error is:

ActionView::TemplateError occurred in home#index:

Request Forgery Protection requires a valid session. Use  
#allow\_forgery\_protection to disable it, or use a valid session.  
On line #33 of analyses/new.erb

30:  
31:

  
32: \<%= error\_messages\_for “bill” %\>  
33: \<%- form\_for(@bill, :url =\> analyses\_path, :html =\>  
{:multipart =\> true}) do |f| %\>  
34: \<%= f.label “PDF upload:” %\>  
  
35:  
36: 

Is there a way to skip before filters? Or am I missing something?

With kind regards,  
Harm
