Repository navigation
Serve QR downloads under /exhibit/ and /artwork/ (#810) - #1017
Merged
Merged
Conversation
On dev.jandig.app every /qrcode/... download from #1006 returned a plain-text "Not found." that never reached Django: the proxy in front of it only forwards known path prefixes. The inline QR codes worked, the PNG/SVG links did not. Move the downloads to /exhibit/qrcode/<slug>.<fmt> and /artwork/qrcode/<id>.<fmt>, prefixes that already reach Django on dev. Templates build the links with url(), so only the routes change. The "Disallow: /qrcode/" robots.txt line goes away: /exhibit/ and /artwork/ are already disallowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
Depois do #1006, em https://dev.jandig.app/ o QR code aparece certo na página da exposição e no modal da obra, e aponta para a URL correta. Mas os links de download (
/qrcode/exhibit/<slug>.png|svge/qrcode/artwork/<id>.png|svg) retornam404 Not found.em texto puro. Essa resposta não vem do Django: o proxy na frente da aplicação só repassa prefixos conhecidos, e/qrcode/não está entre eles. Já/exhibit/...e/artwork/...chegam ao Django normalmente.O que muda
/exhibit/qrcode/<slug>.png|svg/artwork/qrcode/<id>.png|svgurl(), então só as rotas mudam. Nome do arquivo, content type e o 404 para slug/id desconhecido continuam iguais.Disallow: /qrcode/dorobots.txt, porque/exhibit/e/artwork/já estão bloqueados. O teste agora confere que as rotas de download ficam sob esses prefixos.test_qrcodes.pyatualizados para os caminhos novos.Nenhuma mudança de infraestrutura é necessária.
Refs #810
🤖 Generated with Claude Code