I got an application that serves widgets inside iframes of other websites. So far so good but how can I allow these widgets views only to be loaded inside an iframe and not directly?
This should work
<iframe src="http://www.example.com/widgets/example">
But typing in http://www.example.com/widgets/example
directly into a browser shouldn't be allowed.
What is or is there a best way to achieve this in rails?