Skip to content

Commit 193ae0a

Browse files
Merge pull request crocodilestick#199 from morpheus65535/main
Fixed redirect issues to preserve compatibility with reverse proxy subfolder configuration
2 parents 0673a06 + a552dc2 commit 193ae0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

root/app/calibre-web/cps/cwa_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def cwa_switch_theme():
7272
config.config_default_show |= constants.DETAIL_RANDOM
7373

7474
config.save()
75-
return redirect("/", code=302)
75+
return redirect(url_for("web.index"), code=302)
7676

7777
##————————————————————————————————————————————————————————————————————————————##
7878
## ##
@@ -96,7 +96,7 @@ def cwa_library_refresh():
9696
else:
9797
flash(_("Library Refresh: An unexpected error occurred, check the logs."), category="cwa_refresh")
9898

99-
return redirect("/", code=302)
99+
return redirect(url_for("web.index"), code=302)
100100

101101
##————————————————————————————————————————————————————————————————————————————##
102102
## ##
@@ -688,4 +688,4 @@ def get_status():
688688
progress = extract_progress(status)
689689
statusList = {'status':status,
690690
'progress':progress}
691-
return json.dumps(statusList)
691+
return json.dumps(statusList)

0 commit comments

Comments
 (0)