diff --git a/k8s/free2z/backend-config.yaml b/k8s/free2z/backend-config.yaml
index bcdf1405f5d..c980d8e22c7 100644
--- a/k8s/free2z/backend-config.yaml
+++ b/k8s/free2z/backend-config.yaml
@@ -7,6 +7,7 @@ spec:
cdn:
enabled: true
cacheMode: "USE_ORIGIN_HEADERS"
+ # cacheMode: "CACHE_ALL_STATIC"
cachePolicy:
includeHost: true
includeProtocol: true
@@ -20,6 +21,8 @@ spec:
# ttl: 0
# - code: 502
# ttl: 0
+ requestCoalescing: true
+ # 86400
customResponseHeaders:
headers:
- "Strict-Transport-Security: max-age=63072000; includeSubDomains; preload"
diff --git a/k8s/free2z/nginx.conf b/k8s/free2z/nginx.conf
index e473f3b367e..1f2054395b4 100644
--- a/k8s/free2z/nginx.conf
+++ b/k8s/free2z/nginx.conf
@@ -31,6 +31,9 @@ server {
proxy_buffers 8 16k;
proxy_buffer_size 32k;
+ proxy_hide_header Cache-Control;
+ proxy_hide_header Expires;
+
location = /robots.txt {
if ($http_host ~* ^(test|stage)\.) {
return 200 "User-agent: *\nDisallow: /";
diff --git a/py/dj/apps/g12f/admin.py b/py/dj/apps/g12f/admin.py
index cc8ae67bcdf..005afbb2f5c 100644
--- a/py/dj/apps/g12f/admin.py
+++ b/py/dj/apps/g12f/admin.py
@@ -48,7 +48,7 @@ def __init__(self, attrs=None):
class PageForm(ModelForm):
- tags = TagField(widget=WideTagWidget)
+ tags = TagField(widget=WideTagWidget, required=False)
class Meta:
model = zPage
diff --git a/py/dj/apps/g12f/models/zpage.py b/py/dj/apps/g12f/models/zpage.py
index 21958c20423..266000553ca 100644
--- a/py/dj/apps/g12f/models/zpage.py
+++ b/py/dj/apps/g12f/models/zpage.py
@@ -158,7 +158,7 @@ class zPage(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
- publish_at = models.DateTimeField(null=True)
+ publish_at = models.DateTimeField(null=True, blank=True)
class Meta:
verbose_name = "zPage"
diff --git a/py/dj/apps/uploads/serializers.py b/py/dj/apps/uploads/serializers.py
index f793d8ae86b..2ff70dd733e 100644
--- a/py/dj/apps/uploads/serializers.py
+++ b/py/dj/apps/uploads/serializers.py
@@ -21,9 +21,9 @@ class Meta:
]
read_only_fields = ["id", "created_at", "updated_at", "mime_type"]
- def get_url(self, obj):
+ def get_url(self, obj: GenericFile):
# return f"https://test.free2give.xyz/uploadz/{obj.file.name}"
- return f"/uploadz/{obj.file.name}"
+ return obj.get_url()
def get_name(self, obj):
return obj.file.name
diff --git a/ts/react/free2z/src/components/MathMarkdown.tsx b/ts/react/free2z/src/components/MathMarkdown.tsx
index aca00acdbb3..a6941e75495 100644
--- a/ts/react/free2z/src/components/MathMarkdown.tsx
+++ b/ts/react/free2z/src/components/MathMarkdown.tsx
@@ -26,6 +26,7 @@ import { useStoreState } from "../state/persist"
import CodeCopyButton from "./CodeCopyButton";
import { ReactNode, useMemo } from "react";
import React from "react";
+import ReactPlayer from "react-player";
interface MathMarkdownProps {
content: string
@@ -186,7 +187,24 @@ function MemoMarkdown(props: MathMarkdownProps) {
if (url.startsWith('/')) {
url = `https://${window.location.host}${url}`
}
- return
+ // TODO: custom player?
+ // Iframely player looks a bit more polished than ReactPlayer
+ // // Check if the URL ends with supported audio/video formats
+ // const isMediaUrl = /\.(mp4|mp3|ogg|wav|webm)$/i.test(url);
+
+ // if (isMediaUrl) {
+ // return ;
+ // } else {
+ return ;
+ // }
} else {
return (
// @ts-ignore