Skip to content

matsumotory/mruby-mod-mruby-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is moved to mod_mruby core.

mruby-mod-mruby-ext Build Status

Extended Apache class for mod_mruby. You can exnted Apache class by mrbgem.

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :git => 'https://github.com/matsumoto-r/mruby-mod-mruby-ext.git'
end

example

  • write mrblib by Ruby
class Apache
  class Request
    def reverse_proxy path
      self.handler  = "proxy-server"
      self.proxyreq = Apache::PROXYREQ_REVERSE
      self.filename = "proxy:" + path
    end
  end
end
  • proxy implementation by mod_mruby before link this mrbgem
r = Apache::Request.new
r.handler  = "proxy-server"
r.proxyreq = Apache::PROXYREQ_REVERSE
r.filename = "proxy:" + "http://127.0.0.1:8001/proxy.html"
  • proxy implementation by mod_mruby after link this mrbgem
r = Apache::Request.new
r.reverse_proxy "http://127.0.0.1:8001/proxy.html"

License

under the MIT License:

  • see LICENSE file

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages