Hi,
I'm trying to make cartographer/google maps work with an apache2/mongrel setup.
It works fine with lighttpd/fastcgi, however maps don't render with the above setup.
I was wondering if anyone had any success trying this.
Here is what my mongrel configuration file looks like:
<<-=======================================
The problem is with cartographer. When it tries to lookup the api
key, it uses HTTP_HOST in the request. In this setup, its the mongrel.
Here is the fix for vendor/plugins/cartographer/lib/cartographer/
header.rb:
<<===
def self.header_for(request, version=2)
mh = self.new
mh.version = version
#uri = request.request_uri
#uri = uri[0..uri.rindex('/')] if uri.rindex('/') < uri.length
mh.uri = request.env['HTTP_X_FORWARDED_HOST'].split(',')[0]
rescue request.env["HTTP_HOST"] #+ uri
mh.to_s
end