Skip to content

visualize --serve fails due to CORS and integrity check on d3.js #475

@zchangming

Description

@zchangming

Description:
When running code-review-graph visualize --serve and opening graph.html, Firefox blocks the remote d3.v7.min.js file due to CORS and integrity mismatch errors, preventing the graph from rendering.

Steps to Reproduce:
code-review-graph version: latest
Run:
code-review-graph visualize --serve
firefox graph.html

Browser console shows:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://d3js.org/d3.v7.min.js.
Uncaught ReferenceError: d3 is not defined

Expected Result:

graph.html should load the D3.js library and render the graph without CORS errors

Actual Result:

D3.js fails to load, graph cannot be rendered

Notes:

The company internal network cannot access external sites like https://d3js.org, causing the CORS and integrity check failures.

A possible solution is to provide a local copy of D3.js or allow configuration to use a local resource instead of fetching from the CDN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions