Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-339] Redirect to webpack UI no longer works

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionFixed
Resolution Date2021-01-26T18:33:08.000+0000
Affected Version/sAppc Daemon 4.0.0
Fix Version/sAppc Daemon 4.0.1
Componentsappcd-http
Labelsn/a
ReporterEwan Harris
AssigneeChris Barber
Created2021-01-26T13:03:22.000+0000
Updated2021-01-26T18:33:08.000+0000

Description

When the webpack plugin starts up it logs http://127.0.0.1:1732/webpack/latest/web which is ultimately just a redirect to http://localhost:8084/webpack/, in daemon 3.2.0 this worked just fine. But in daemon 4.0.0 the redirect doesn't occur and Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-rbDz5zKbrDcvUjvzY4CUJr/ihRIJa3MRNe6JClpt9Jc='), or a nonce ('nonce-...') is required to enable inline execution is logged in the console

Comments

  1. Ewan Harris 2021-01-26

    This is down to the koa-helmet 5 -> 6 update which includes the helmet 3 -> 4 update. Helmet 4 enabled CSP by default https://github.com/helmetjs/helmet/wiki/Helmet-4-upgrade-guide, it either needs disabling completely by passing {contentSecurityPolicy: false} to koa-helmet, or by setting the CSP to be valid
  2. Chris Barber 2021-01-26

    PR: https://github.com/appcelerator/appc-daemon/pull/522

JSON Source