mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-26 01:26:00 +03:00
[GH-ISSUE #724] Discussion: Serve in a subfolder #3477
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#3477
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @danisztls on GitHub (Apr 26, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/724
Current paths are:
I suggest optionally having it under a subfolder to make it easier to put ArchiveBox under a reverse proxy like Nginx.
Is it feasable?
@pirate commented on GitHub (Apr 27, 2021):
It's pretty difficult, but not impossible, there are a lot of
/relativeurls all over the codebase. A bunch are in the static html too, so it's hard to change them after-the-fact since they wouldn't be re-rendered after you reconfigure it automatically.@pirate commented on GitHub (Apr 27, 2021):
Reopening because I do want to allow this to be done eventually when I have time, it just probably wont be done anytime soon.
@FraMecca commented on GitHub (Aug 18, 2021):
What about this:
https://ubuntu.com/blog/django-behind-a-proxy-fixing-absolute-urls
@mhfowler commented on GitHub (Aug 18, 2021):
fwiw this would be helpful for the purpose of packaging archivebox as a yunohost package, something I've been working on. discussed here https://forum.yunohost.org/t/nginx-config-for-path/16887
@ss89 commented on GitHub (Mar 12, 2022):
i'd also like to see this feature
@pirate commented on GitHub (Mar 13, 2022):
Doing this breaks a surprising amount of things because of how relative paths are written statically to the filesystem in the index.json/html files. It's fixable with rewriting in a Django middleware but it's complicated and there are a lot of edge cases and it's still low on my personal priority list.
@hellodword commented on GitHub (Feb 28, 2023):
totally agree
@pirate commented on GitHub (Feb 28, 2023):
I think I'm actually going to close this as
wontfixbecause of the security issues. ArchiveBox really should only be hosted from a dedicated subdomain, because it's extremely risky to rehost archived JS on a domain shared with other sites. It breaks CORS / CSRF / CSP and many other web security mechanisms to have untrusted content and JS on a domain shared with other apps. It's already risky enough hosting the admin UI on the same domain as snapshot content, let alone exposing that risk to other apps.It's the same reason why user-uploaded content is stored on
xxx.googleusercontent.cominstead ofgoogle.com, orraw.githubusercontent.cominstead ofgithub.com. Most big companies don't keep arbitrary untrusted web content on the same domain (even subdomain) as trusted application code. It's very hard to sanitize HTML/JS/CSS 100% perfectly, rather than take the risk they just quarantine it on a domain with no auth cookies. https://security.googleblog.com/2012/08/content-hosting-for-modern-web.htmlFor more info see here: https://github.com/ArchiveBox/ArchiveBox/issues/239
@sasasqt commented on GitHub (Aug 22, 2023):
well, if you insist, here is the nginx code that redirect yourdomain/archivebox/ to 127.0.0.1:8000