Advertisement
Guest User

dispatch.fcgi

a guest
Oct 26th, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. require File.dirname(__FILE__) + '/../config/boot'
  4. require File.dirname(__FILE__) + '/../config/environment'
  5.  
  6. class Rack::PathInfoRewriter
  7. def initialize(app)
  8. @app = app
  9. end
  10.  
  11. def call(env)
  12. env.delete('SCRIPT_NAME')
  13. parts = env['REQUEST_URI'].split('?')
  14. env['PATH_INFO'] = parts[0]
  15. env['QUERY_STRING'] = parts[1].to_s
  16. @app.call(env)
  17. end
  18. end
  19.  
  20. Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement