forked from CFC-Servers/cfc_chat_transit
Update response headers, regenerate image on each join
This commit is contained in:
parent
53f78031f5
commit
804949b357
@ -25,6 +25,7 @@ http {
|
||||
listen 80;
|
||||
|
||||
location /avatars/ {
|
||||
add_header 'Cache-Control' 'public, s-maxage 3600, proxy-revalidate';
|
||||
include /etc/nginx/mime.types;
|
||||
root /usr/share/nginx/html;
|
||||
autoindex on;
|
||||
|
@ -1,6 +1,6 @@
|
||||
from PIL import Image, ImageDraw
|
||||
from flask import Flask, request, send_file
|
||||
import os.path
|
||||
import os
|
||||
|
||||
import requests
|
||||
|
||||
@ -21,7 +21,7 @@ def outline():
|
||||
avatar_path = f"/avatars/{image_name}.png"
|
||||
|
||||
if os.path.isfile(avatar_path):
|
||||
return f"{base_url}{avatar_path}"
|
||||
os.remove(avatar_path)
|
||||
|
||||
outline_color = content["outlineColor"] # "255 255 255 255"
|
||||
outline_color = outline_color.split(" ") # ["255", "255", "255", "255"]
|
||||
|
Loading…
Reference in New Issue
Block a user