Repository navigation
Widget served by the API (script tag), npm dropped, noscript fix - #38
Merged
Merged
Conversation
- GET /widget/v1/feedback.js and its lazy chunks/ are served by Laravel with Access-Control-Allow-Origin: *, Cross-Origin-Resource-Policy and ETag. The deploy build used to copy them to public/, where the web server answered without CORS and screenshots failed on other websites. - npm run build compiles the widget straight into resources/widget/v1; publish-api.mjs, the release workflow, type definitions, sri.json, publint and attw are gone. The widget package is private. - README: one script tag from the API instead of npm, loading options, Laravel example, CSP, deployment build step. - Tests: Pest for headers, caching, 304 and path restrictions; full stack E2E loads the widget by script tag from the API and sends a screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The clone is rendered without scripts, so <noscript> content showed up, on web.atrion.test as literal markup in the header. 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.
Follow-up to #36 (merged at 47cd2b8). Two commits:
GET /widget/v1/feedback.jsand its lazychunks/are served by Laravel withAccess-Control-Allow-Origin: *. Today the build lands inpublic/, where the web server answers without CORS, so screenshots fail on every other website using the script tag (verified against production).npm run buildnow compiles intoresources/widget/v1; release workflow, type definitions, SRI, publint/attw removed; README shows the script tag only.<noscript>toast markup showed up as literal text on web.atrion.test.Deploy note: the Laravel Cloud build command must keep running
npm ci && npm run buildin the root; without it/widget/v1/feedback.jsanswers 403.Tests: Pest 335 passed (new
WidgetAssetTest), Larastan/Pint clean; widget Vitest 155, Playwright 149 (Chromium, WebKit, mobile); full stack 14 incl. loading the widget by script tag from the API with a screenshot. Verified on web.atrion.test against the new API.🤖 Generated with Claude Code