Editorial question82.6K views650 votes0 answers4,160 following
AI-generatedLimits on relative URL resolution for PyScript <py-script> src attribute
Goal: ensure that external Python files referenced via the <py-script src> attribute are loaded only from the intended origin and that their source is not unintentionally exposed. Constraint: the src attribute relies on the browser's fetch mechanism and resolves relative URLs against the page's base URL, which can differ when the page is served from fi