-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Interface:Routes
Damian Jarek edited this page Mar 2, 2017
·
4 revisions
HTTP API routes The routes interface was added in order to allow external web application to query and mutate internal game state via a REST API. By default the REST server is started on port 7174 and is only bound to localhost. It is possible to change these via config.lua, however make sure that if you do you know what you're doing. It is recommended that you run this API behind a reverse proxy (e.g. nginx) to provide TLS and rate limiting. ###Available events: Authenticator:hasPermissions(session, permissions)
Authenticator:onSessionClose()
###### Authenticator:hasPermissions(session, permissions) > **Description:** This event runs on every request to check whether a particular API sessions has access to a HTTP resource. > **Parameters:**
- session - a table that represents the remote peer's session._ >
- _item_ - permissions required to access the resource.
- session - a table that represents the remote peer's session.
Added in version: 1.3