The Wayback Machine - https://web.archive.org/web/20200905073159/https://github.com/shibayan/iislua/
Skip to content
master
Go to file
Code

README.md

iislua

Build Status Release Downloads 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 version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <iislua>
      <beginRequest scriptPath="C:\inetpub\beginrequest.lua" />
      <mapPath scriptPath="C:\inetpub\mappath.lua" />
    </iislua>
  </system.webServer>
</configuration>

Usage

Return status code

iis.exit(404)

Redirect

iis.redirect("http://buchizo.wordpress.com/")

Refuse http method

if iis.req.http_method() ~= "POST" then
    iis.exit(405)
end

Cross domain access control

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

if iis.req.get_url() == "/" then
   iis.exec("/iisstart.htm")
end

About

It brings the power of Lua scripting in your IIS.

Topics

Resources

License

Sponsor this project

 
Learn more about GitHub Sponsors

Packages

No packages published
You can’t perform that action at this time.