Skip to content

matsumotory/mruby-ngx-mruby-ext

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

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