Skip to content

Extended Nginx class for ngx_mruby. You can exnted Nginx class by mrbgem.

License

Notifications You must be signed in to change notification settings

matsumotory/mruby-ngx-mruby-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is moved to ngx_mruby core.

mruby-ngx-mruby-ext Build Status

Extended Nginx class for ngx_mruby. You can exnted Nginx 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-ngx-mruby-ext.git'
end

example

  • define method by mrbgem
class Nginx
  class Headers_in
    def user_agent
      self["User-Agent"]
    end
  end
end
  • you can use the method defined by mruby-ngx-mruby-ext in ngx_mruby
Nginx.echo Nginx::Request.new.headers_in.user_agent
#=> "your user agent"

License

under the MIT License:

  • see LICENSE file

About

Extended Nginx class for ngx_mruby. You can exnted Nginx class by mrbgem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages