https://github.com/shibayan/iislua
It brings the power of Lua scripting in your IIS.
https://github.com/shibayan/iislua
iis lua-script
Last synced: 9 months ago
JSON representation
It brings the power of Lua scripting in your IIS.
- Host: GitHub
- URL: https://github.com/shibayan/iislua
- Owner: shibayan
- License: apache-2.0
- Created: 2015-06-22T14:38:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-07-30T05:01:53.000Z (over 3 years ago)
- Last Synced: 2025-03-26T16:46:35.303Z (9 months ago)
- Topics: iis, lua-script
- Language: C++
- Homepage: http://shibayan.github.io/iislua/
- Size: 2.82 MB
- Stars: 17
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
iislua
================

[](https://github.com/shibayan/iislua/releases/latest)
[](https://github.com/shibayan/iislua/releases/latest)
[](https://github.com/shibayan/iislua/blob/master/LICENSE)
It brings the power of Lua scripting in your IIS.
## Install
Download MSI file from following page. (x64 version)
https://github.com/shibayan/iislua/releases
## Configuration
### Web.config
```xml
```
## Usage
### Return status code
```lua
iis.exit(404)
```
### Redirect
```lua
iis.redirect("http://buchizo.wordpress.com/")
```
### Refuse http method
```lua
if iis.req.http_method() ~= "POST" then
iis.exit(405)
end
```
### Cross domain access control
```lua
req_headers = iis.req.get_headers()
if req_headers["Origin"] ~= nil then
iis.resp.set_header("Access-Control-Allow-Origin", req_headers["Origin"])
end
```
### Rewrite to other url
```lua
if iis.req.get_url() == "/" then
iis.exec("/iisstart.htm")
end
```