mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-28 06:53:12 +08:00
Remove absolute URIs from settings page (#1261)
* Remove absolute URIs from admin page The rest of the links on this page are absolute paths without a specified hostname, but these in particlar use build_absolute_uri. I am running linkding behind two different load balancers which makes these links bubble up the "internal" hostname instead of the hostname I actually got to the page from. * Add LD_USE_X_FORWARDED_HOST See: https://docs.djangoproject.com/en/6.0/ref/settings/#std-setting-USE_X_FORWARDED_HOST
This commit is contained in:
@@ -133,18 +133,18 @@ class SettingsIntegrationsViewTestCase(TestCase, BookmarkFactoryMixin, HtmlTestM
|
||||
|
||||
token = FeedToken.objects.first()
|
||||
self.assertInHTML(
|
||||
f'<a target="_blank" href="http://testserver/feeds/{token.key}/all">All bookmarks</a>',
|
||||
f'<a target="_blank" href="/feeds/{token.key}/all">All bookmarks</a>',
|
||||
html,
|
||||
)
|
||||
self.assertInHTML(
|
||||
f'<a target="_blank" href="http://testserver/feeds/{token.key}/unread">Unread bookmarks</a>',
|
||||
f'<a target="_blank" href="/feeds/{token.key}/unread">Unread bookmarks</a>',
|
||||
html,
|
||||
)
|
||||
self.assertInHTML(
|
||||
f'<a target="_blank" href="http://testserver/feeds/{token.key}/shared">Shared bookmarks</a>',
|
||||
f'<a target="_blank" href="/feeds/{token.key}/shared">Shared bookmarks</a>',
|
||||
html,
|
||||
)
|
||||
self.assertInHTML(
|
||||
'<a target="_blank" href="http://testserver/feeds/shared">Public shared bookmarks</a>',
|
||||
'<a target="_blank" href="/feeds/shared">Public shared bookmarks</a>',
|
||||
html,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user