make CF cache emojis without an extra page rule

master
Aevann 2023-03-17 11:44:05 +02:00
parent 3365e933df
commit a83dc8bba9
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ const emojisSearchDictionary = {
// get public emojis list // get public emojis list
const emojiRequest = new XMLHttpRequest(); const emojiRequest = new XMLHttpRequest();
emojiRequest.open("GET", '/emojis'); emojiRequest.open("GET", '/emojis.csv?v=1');
emojiRequest.setRequestHeader('xhr', 'xhr'); emojiRequest.setRequestHeader('xhr', 'xhr');
emojiRequest.onload = async (e) => { emojiRequest.onload = async (e) => {
let emojis = JSON.parse(emojiRequest.response); let emojis = JSON.parse(emojiRequest.response);

View File

@ -61,7 +61,7 @@ def marseys(v:User):
break break
return render_template("marseys.html", v=v, marseys=marseys) return render_template("marseys.html", v=v, marseys=marseys)
@app.get("/emojis") @app.get("/emojis.csv")
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
def emoji_list(): def emoji_list():
return get_emojis(g.db) return get_emojis(g.db)