Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

II.1.d. server

Andrey Bogdanov edited this page May 21, 2016 · 6 revisions

Contents

Options

server.chat.ttl

Time-to-live for the private chats (in minutes). If no new message is added within the TTL, the chat is deleted from the database.

Default: 10080 (7 days).

server.ddosProtection.checkInterval

Interval (in milliseconds) to check connections and decrement weights for the DDoS protection module.

Default: 1000 (1 second).

server.ddosProtection.enabled

Determines whether simple DDoS protection module is enabled.

See the GitHub repo for detailed description.

DDoS protection is enabled by default.

server.ddosProtection.errorCode

HTTP error code to be set on DDoS detection.

Default: 429 (Too Many Requests).

Warning: You should not change it.

server.ddosProtection.errorData

Data to be passes to the client on DDoS detection.

Default: "Not so fast!".

Note: The data may be an HTML string.

server.ddosProtection.maxWeight

Default maximum allowed weight per IP.

Default: 10.

server.ddosProtection.rules

Array of rules to apply to each request.

By default, the following rules are applied:

[
    {
        regexp: "^/api.*",
        maxWeight: 6,
        queueSize: 4
    },
    {
        string: "/action/search",
        maxWeight: 1
    },
    {
        regexp: ".*",
        maxWeight: 10
    }
]
server.ddosProtection.static

Enable DDoS protection of static content.

By default, static content is not DDoS-protected.

server.ddosProtection.weight

Default request weight.

Default: 1.

server.ddosProtection.ws.connectionLimit

WebSocket connection limit per IP.

Default: 10.

server.ddosProtection.ws.maxMessageLength

Maximum WebSocket message length.

Default: 20480.

server.port

The port on which the server will listen for connections. Normally 80, but the value may differ if the traffic goes through some HTTP server, such as nginx.

Default: 8080.

server.rss.enabled

Determines if the RSS feed is generated for each board.

By default RSS feed generation is enabled.

server.rss.postCount

Number of posts to include in the RSS feed.

Default: 500.

server.rss.ttl

RSS feed time-to-live (in minutes). Every server.rss.ttl minutes the RSS feed is regenerated.

Default: 60 (1 hour).

server.statistics.enabled

Determines if the total and board statistics are generated.

By default statistics generation is enabled.

server.statistics.ttl

Statistics time-to-live (in minutes). Every server.statistics.ttl minutes the statistics are regenerated.

Default: 60 (1 hour).

server.youtubeApiKey

YouTube API key used to retrieve YouTube videos information in the posts and to markup the corresponding links properly (adding a tooltip with video title and thumbnail, and creating an expandable embedded YouTube player). YouTube API documentation.

Clone this wiki locally