Silvermoon logo

sm.set_header

sm.set_header is a API function which sets current response’s header.

Usage

sm.set_header(name,content)

Example:

local auth = sm.header.X_API_TOKEN;
if (auth == "12345") then --100% secure API key check
  sm.set_header("X-Valid-Api-Key","true")
end