Editing User:LetterN

From Eco - English Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
== Technical guides ==
# the testing zone
=== 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.
NAMESPACE ARGV: {{NAMESPACE}}
<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
SUBPAGE DETECT: {{SUBPAGENAME}}
<syntaxhighlight lang="text" line="1">
 
(
NS NUMBER: {{ns:0}}
    http.host eq "YOUR-DOMAIN"
 
    and not http.request.uri.path contains "/api"
math: {{#ifeq:{{NAMESPACE}}|{{ns:0}}|"TEST 1"|"TEST 1"}}
    and (http.request.uri.path contains "/css" or http.request.uri.path contains "/js" or http.request.uri.path contains "/img")
)
</syntaxhighlight>
Please note that all contributions to Eco - English Wiki are considered to be released under the CC BY-NC-SA 4.0 (see Eco:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)