Skip to content

Scope CoolProp CSP exception to Mollier pages - #6

Merged
iguchi-lab merged 1 commit into
mainfrom
codex/mollier-csp-scope
Aug 17, 2026
Merged

iguchi-lab merged 1 commit into
mainfrom
codex/mollier-csp-scope

Conversation

@iguchi-lab

Copy link
Copy Markdown
Owner

What changed

  • Added a dedicated CloudFront response headers policy for /mollier/*.
  • Allowed CoolProp's required JavaScript and WebAssembly dynamic compilation only on Mollier pages.
  • Restored the stricter CSP for all other calculator pages.
  • Added regression tests that verify the exception remains path-scoped.

Why

CoolProp's Emscripten browser bundle uses JavaScript's Function constructor in addition to WebAssembly compilation. The existing CSP allowed only wasm-unsafe-eval, so browsers blocked Mollier calculations.

Validation

  • python -m pytest -c pytest-verified.ini — 8 passed
  • aws cloudformation validate-template --template-body file://template-deploy.yaml --region ap-northeast-1 — passed
  • JavaScript chart tests will run in GitHub Actions because Node.js is not installed locally.

@iguchi-lab
iguchi-lab marked this pull request as ready for review August 17, 2026 07:17
@iguchi-lab
iguchi-lab merged commit c94d050 into main Aug 17, 2026
1 check passed
@iguchi-lab
iguchi-lab deleted the codex/mollier-csp-scope branch August 17, 2026 07:17
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