fix
patch
phase18
feat/phase-2g-bundle
fix(phase18): use apiBase for upload and image-proxy URLs (hosted parity)
triggerImageUpload used a hard-coded relative URL /api/v1/notes/.../upload-image. On knowtation.store the frontend is served from the ICP canister (BunnyCDN/IPFS via 4Everland) but the Knowtation API runs on the Netlify gateway. Relative URLs therefore hit the ICP canister which returns 405 "Method POST not allowed: read only access" — surfaced as 502 in the browser.
config.js already sets window.HUB_API_BASE_URL = 'https://knowtation-gateway.netlify.app' for knowtation.store; hub.js resolves this into apiBase. Both the upload fetch and the rewriteGitHubImageUrls proxy prefix now use apiBase so all requests reach the gateway regardless of which host serves the frontend.
sha256:f6a79529c9532264b2d928d82fac5dfba32bc937ee2b8d65c8a00feaf289c29f
sha
sha256:e9f55ea1e4618bf3f9027871ffcc9b5d04997c4d895fbcb7f6c59bae6a37eb1f
snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:f6a79529c9532264b2d928d82fac5dfba32bc937ee2b8d65c8a00feaf289c29f --body "your comment"
No comments yet. Be the first to start the discussion.