Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matsumotory/mruby-mod-mruby-ext
https://github.com/matsumotory/mruby-mod-mruby-ext
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/matsumotory/mruby-mod-mruby-ext
- Owner: matsumotory
- License: other
- Created: 2014-02-08T08:47:58.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-11T13:52:10.000Z (about 10 years ago)
- Last Synced: 2024-10-18T18:25:04.639Z (3 months ago)
- Language: Ruby
- Size: 207 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# This is moved to mod_mruby core.
# mruby-mod-mruby-ext [![Build Status](https://travis-ci.org/matsumoto-r/mruby-mod-mruby-ext.png?branch=master)](https://travis-ci.org/matsumoto-r/mruby-mod-mruby-ext)
Extended Apache class for mod_mruby. You can exnted Apache class by mrbgem.## install by mrbgems
- add conf.gem line to `build_config.rb````ruby
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
```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
```ruby
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
```ruby
r = Apache::Request.new
r.reverse_proxy "http://127.0.0.1:8001/proxy.html"
```## License
under the MIT License:
- see LICENSE file