hero_office_ui forces upgrade-insecure-requests CSP, breaking HTTP-only OnlyOffice setups #9
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_office#9
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?
Symptom
Loading the editor wrapper against an
http://OnlyOffice instance fails:DocsAPI is not definedCause
crates/hero_office_ui/src/handlers.rsemitted theupgrade-insecure-requestsCSP unconditionally — both as a<meta>tag and as a response header. Browsers honored it and rewrote everyhttp://OnlyOffice URL tohttps://before fetching, even whenOO_SERVER_URLwas explicitly HTTP.Repro
hero_office_uiwithOO_SERVER_URL=http://<host>:8088http://<host>:9988/hero_office/ui/word/edit/<file>.docxExpected
CSP should only emit when
OO_SERVER_URLis HTTPS — HTTP-only dev setups need to keep talking HTTP.Fixed by #8.