An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

iislua
================

![Build](https://github.com/shibayan/iislua/workflows/Build/badge.svg)
[![Release](https://img.shields.io/github/v/release/shibayan/iislua?include_prereleases&sort=semver)](https://github.com/shibayan/iislua/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/shibayan/iislua/total.svg)](https://github.com/shibayan/iislua/releases/latest)
[![License](https://img.shields.io/github/license/shibayan/iislua.svg)](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
```