fix(office_ui): emit upgrade-insecure-requests CSP only when OO_SERVER_URL is https #8
No reviewers
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!8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_csp_only_when_https"
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?
Summary
Editor wrapper unconditionally set the
upgrade-insecure-requestsCSP (meta tag + response header). Browsers then forcedhttp://OnlyOffice URLs tohttps://, breaking HTTP-only dev setups with SSL handshake errors andDocsAPI is not defined.Related Issue
None.
Changes
crates/hero_office_ui/src/handlers.rs: skip CSP whenOO_SERVER_URLstarts withhttp://Test Results
cargo build --release --bin hero_office_uipasses.Manual verification
http://[..mycelium..]:9988/hero_office/ui/word/edit/test.docx?context=geomindwithOO_SERVER_URL=http://[..mycelium..]:8088: OnlyOffice editor renders fully (toolbar + page) instead of failing on SSL handshake.Filed bug report: #9