KNOWN-ISSUES 582 B

123456789101112131415161718192021
  1. = Known issues with Rack and Web servers
  2. * Lighttpd sets wrong SCRIPT_NAME and PATH_INFO if you mount your
  3. FastCGI app at "/". This can be fixed by using this middleware:
  4. class LighttpdScriptNameFix
  5. def initialize(app)
  6. @app = app
  7. end
  8. def call(env)
  9. env["PATH_INFO"] = env["SCRIPT_NAME"].to_s + env["PATH_INFO"].to_s
  10. env["SCRIPT_NAME"] = ""
  11. @app.call(env)
  12. end
  13. end
  14. Of course, use this only when your app runs at "/".
  15. Since lighttpd 1.4.23, you also can use the "fix-root-scriptname" flag
  16. in fastcgi.server.