Skip to content

K2GO-99 fix(addons): serve .cgp as octet-stream so the app downloads it - #612

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-99-cgp-octet-stream
Oct 2, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-99-cgp-octet-stream

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What

Declare MIME types in the code_addons nginx conf and serve .cgp (and the
source .tar.gz) as application/octet-stream.

Why

The conf declared no types, so nginx fell back to its default_type (text/html)
for .cgp. The in-app WebView then rendered the archive as text instead of
triggering a download. An nginx types{} block replaces the inherited mime.types
inside the location, so the gallery's own types (html/css/js/json/png/svg/ico)
are re-declared next to the download types to keep the gallery rendering.

Verification

On the box: /code-addons/ serves the gallery, and tapping a card's Download
saves a valid .cgp (ZIP).

Note

The dash-node add-ons refresh re-mirrors content, not the nginx conf, so
already-deployed boxes do not self-heal this. New bakes include it.

The code_addons nginx conf declared no MIME types, so nginx served .cgp
as its default text/html and the in-app WebView rendered the archive as
text instead of downloading it. Add a types{} block serving .cgp and the
source .tar.gz as application/octet-stream; the gallery's own types
(html/css/js/json/png/svg/ico) are re-declared because an nginx types{}
block replaces the inherited mime.types within the location.
@luisguzman-adfa
luisguzman-adfa merged commit fe6decd into main Oct 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant