Skip to content

🐛 CORS Error When Submitting "Update the Constitution" Proposal with Non-GitHub URL #2987

@kneerose

Description

@kneerose

Area

Proposal Pillar

Domain

preview.gov.tools

Which wallet were you using?

No response

Context

I encountered a CORS error while attempting to submit an "Update the Constitution" proposal using a constitution URL that is not hosted on GitHub. The submission works smoothly when a GitHub URL is used, but it fails for other URLs due to CORS restrictions. CORS should be allowed for all constitution URLs, regardless of the domain.

Steps to reproduce

  1. Connect a wallet.
  2. Create a constitution-type proposal using a valid GitHub URL, e.g., https://raw.githubusercontent.com/kneerose/test-bucket/refs/heads/main/constitution_url.
  3. Submit the proposal—no errors occur.
  4. Create another constitution-type proposal using a valid non-GitHub URL, e.g., https://metadata-govtool.cardanoapi.io/data/constitution.
  5. Attempt to submit the proposal as a governance action.

Actual behavior

  • CORS is blocked for constitution URLs that are not hosted on GitHub.

  • Proposal submission succeeds when the constitution URL is hosted on GitHub.
    Image

  • Proposal submission fails when the constitution URL is hosted on a domain other than GitHub.

Image

Expected behavior

CORS should be enabled for all constitution URLs, regardless of the domain.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions