Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Forbidden" message is shown when I access a Sinatra app on AppFog
    primarykey
    data
    text
    <p>I uploaded a simple Sinatra app to AppFog. It worked well on my local machine. But after uploading the app to AppFog, a page with "Forbidden" message is shown when I access to <a href="http://recall.ap01.aws.af.cm/" rel="nofollow">AppFog domain</a>.</p> <p>These are appFog logs:</p> <pre><code>====&gt; /logs/stderr.log &lt;==== ... W, [2012-06-01T06:32:54.008426 #28933] WARN -- : attack prevented by Rack::Protection::IPSpoofing 211.32.146.42 - - [01/Jun/2012 06:32:54] "GET / HTTP/1.1" 403 - 0.0002 10.0.64.157 - - [01/Jun/2012:06:32:54 UTC] "GET / HTTP/1.0" 403 9 - -&gt; / W, [2012-06-01T06:32:54.393022 #28933] WARN -- : attack prevented by Rack::Protection::IPSpoofing 211.32.146.42 - - [01/Jun/2012 06:32:54] "GET /favicon.ico HTTP/1.1" 403 - 0.0002 10.0.64.157 - - [01/Jun/2012:06:32:54 UTC] "GET /favicon.ico HTTP/1.0" 403 9 - -&gt; /favicon.ico </code></pre> <p>I did not use <code>Rack::Protection::IPSpoofing</code> in my code, but I get those errors. <code>Rack::Utils</code> is used in helpers block. Is that causing the problem?</p> <p>The only Ruby code I wrote is following:</p> <pre><code>require 'sinatra' require 'data_mapper' require 'builder' require 'sinatra/flash' require 'sinatra/redirect_with_flash' require 'haml' enable :sessions SITE_TITLE = "Recall" SITE_DESCRIPTION = "'cause you're too busy to remember" DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/recall.db") class Note include DataMapper::Resource property :id, Serial property :content, Text, :required =&gt; true property :complete, Boolean, :required =&gt; true, :default =&gt; false property :created_at, DateTime property :updated_at, DateTime end DataMapper.finalize.auto_upgrade! helpers do include Rack::Utils alias_method :h, :escape_html end get '/' do @notes = Note.all :order =&gt; :id.desc @title = 'All Notes' if @notes.empty? flash[:error] = 'No notes found. Add your first below.' end haml :home end # ... </code></pre> <p>You can check out the whole source codes <a href="https://github.com/philipjkim/sinatra-quickstart" rel="nofollow">here</a>.</p> <p>How can I solve this problem? Thanks for any advices.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload