Skip to content

Commit

Permalink
backword compatiblity for media urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Her Email committed Dec 11, 2023
1 parent c8bafef commit 62cd9b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions misc/nginx.conf.d/neodb-dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ server {
alias /www/m/;
add_header Cache-Control "public, max-age=604800, immutable";
}
# backwards compatibility with versions before 2023.11
location ~* ^/media/(album|book|game|item|movie)/(.+)$ {
return 302 https://$host/m/$1/$2;
}
# Proxies media and remote media with caching
location ~* ^/(media|proxy) {
# Cache media and proxied resources
Expand Down
4 changes: 4 additions & 0 deletions misc/nginx.conf.d/neodb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ server {
alias /www/m/;
add_header Cache-Control "public, max-age=604800, immutable";
}
# backwards compatibility with versions before 2023.11
location ~* ^/media/(album|book|game|item|movie)/(.+)$ {
return 302 https://$host/m/$1/$2;
}
# Proxies media and remote media with caching
location ~* ^/(media|proxy) {
# Cache media and proxied resources
Expand Down
4 changes: 2 additions & 2 deletions users/templates/users/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</fieldset>
{% if request.user.mastodon_acct %}
<fieldset>
转发到 @{{ request.user.mastodon_acct }} 时间轴时:
转发到<em data-tooltip="@{{ request.user.mastodon_acct }}">主ID</em>时间轴时:
<input type="radio"
name="mastodon_repost_mode"
value="0"
Expand All @@ -119,7 +119,7 @@
</fieldset>
<fieldset>
<label>
发表时默认选中转发到 @{{ request.user.mastodon_acct }} 时间轴
发表时默认选中 转发到<em data-tooltip="@{{ request.user.mastodon_acct }}">主ID</em>时间轴
<input type="checkbox"
name="mastodon_default_repost"
value="1"
Expand Down

0 comments on commit 62cd9b3

Please sign in to comment.