# Document referer

**URL:** <https://www.ruby-forum.com/t/document-referer/170367>\
**Category:** Rails\
**Created:** [June 16, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/document-referer/170367 "2009-06-16T17:42:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveCox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@SteveCox](https://www.ruby-forum.com/u/SteveCox)\
**Post date:** [June 16, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/document-referer/170367/1 "2009-06-16T17:42:52Z")

</div>

Hi, I want to allow only a handful of refering sites to access parts  
of my application.

I understand that in rails I can use request.referer which does  
identify the refering site correctly however is it possible for the  
less desirable to “spoof” this in order to access the app.

If so is there any other way of protecting the app.

Thanks in advance.  
Steve
