Web Interface: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
No edit summary Tag: 2017 source edit |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Web interface screenshot.png|alt=Web interface screenshot|thumb|The web interface showing graph and world data.]] | |||
The [[Web Interface]] for each particular server can be launched from in-game, either from the | The [[Web Interface]] for each particular server can be launched from in-game, either from the Graphs button (hotkey: G), or the [[Laws]] window. Viewing world data, proposing laws, voting on laws, and world leader elections all take place within the web interface. | ||
The web interface will launch on your computer's default web browser. | The web interface will launch on your computer's default web browser. | ||
== Technical guides by LetterN== | |||
=== Optimization - [[Web Interface]] === | |||
If you are running your Web Interface behind Cloudflare, you can configure caching to improve transfer time as the default server is slow on transferring. Here is a config using Cache Rules on your Cloudflare Dashboard. | |||
Make sure to replace <code>YOUR-DOMAIN</code> with your domain you used | |||
Set this as a new first rule, you can name it "eco optimizion - do not cache the api endpoint". Make sure to set "Bypass cache" so this does not get cached. | |||
<syntaxhighlight lang="text" line="1"> | |||
( | |||
http.host eq "YOUR-DOMAIN" | |||
and (http.request.uri.path contains "/api" or http.request.uri.path contains "/Layers") | |||
) | |||
</syntaxhighlight> | |||
Create a second rule, this is for caching assets and static objects. Make sure to set "Eligible for cache" and "Override origin" on the "Edge TTL". You can set the TTL higher, i recommend 14 days or higher. For "Browser TTL" You can make it 2 days or higher | |||
<syntaxhighlight lang="text" line="1"> | |||
( | |||
http.host eq "YOUR-DOMAIN" | |||
and not http.request.uri.path contains "/api" | |||
and (http.request.uri.path contains "/css" or http.request.uri.path contains "/js" or http.request.uri.path contains "/img") | |||
) | |||
</syntaxhighlight> |
Latest revision as of 14:12, 27 June 2024
The Web Interface for each particular server can be launched from in-game, either from the Graphs button (hotkey: G), or the Laws window. Viewing world data, proposing laws, voting on laws, and world leader elections all take place within the web interface.
The web interface will launch on your computer's default web browser.
Technical guides by LetterN[edit | edit source]
Optimization - Web Interface[edit | edit source]
If you are running your Web Interface behind Cloudflare, you can configure caching to improve transfer time as the default server is slow on transferring. Here is a config using Cache Rules on your Cloudflare Dashboard.
Make sure to replace YOUR-DOMAIN
with your domain you used
Set this as a new first rule, you can name it "eco optimizion - do not cache the api endpoint". Make sure to set "Bypass cache" so this does not get cached.
(
http.host eq "YOUR-DOMAIN"
and (http.request.uri.path contains "/api" or http.request.uri.path contains "/Layers")
)
Create a second rule, this is for caching assets and static objects. Make sure to set "Eligible for cache" and "Override origin" on the "Edge TTL". You can set the TTL higher, i recommend 14 days or higher. For "Browser TTL" You can make it 2 days or higher
(
http.host eq "YOUR-DOMAIN"
and not http.request.uri.path contains "/api"
and (http.request.uri.path contains "/css" or http.request.uri.path contains "/js" or http.request.uri.path contains "/img")
)