Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: .ic-assets.json configuration entries no longer overwrite the default for allow_raw_access #3635

Merged
merged 5 commits into from
Mar 4, 2024

Conversation

ericswanson-dfinity
Copy link
Member

Description

Previously, any configuration element in .ic-assets.json functioned as if a setting of
"allow_raw_access": true were present in the json object.

For example, given the following configuration, all files would be configured
with allow_raw_access set to true, as if the second entry specified
"allow_raw_access": true (which is the default), even though it does not.

[
  {
    "match": "**/*",
    "allow_raw_access": false
  },
  {
    "match": "**/*",
    "headers": {
      "X-Anything": "Something"
    }
  }
]

Now, given the same configuration, all files would be configured with allow_raw_access set to false, as expected.

Note that the default value of allow_raw_access is still true.

Fixes https://dfinity.atlassian.net/browse/SDK-1238

Notes to reviewers:

How Has This Been Tested?

Added e2e tests, as well as a unit test from #3434

This PR is broken up into two commits. The first adds the tests, two of which fail. The second

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@ericswanson-dfinity ericswanson-dfinity marked this pull request as ready for review March 4, 2024 19:55
@ericswanson-dfinity ericswanson-dfinity enabled auto-merge (squash) March 4, 2024 21:09
@ericswanson-dfinity ericswanson-dfinity merged commit b626fd4 into master Mar 4, 2024
172 of 173 checks passed
@ericswanson-dfinity ericswanson-dfinity deleted the ens/sdk-1238-incorrect-default-override branch March 4, 2024 21:32
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.

2 participants