Skip to content

Conversation

ilbertt
Copy link
Member

@ilbertt ilbertt commented Sep 23, 2025

Description

Returns the ic_env cookie for all the html files. The cookie includes the root key and all the canister environment variables prefixed with PUBLIC_.

How Has This Been Tested?

Tests will be added in a follow-up PR.

Checklist:

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

@ilbertt ilbertt marked this pull request as ready for review September 25, 2025 12:16
@ilbertt ilbertt requested a review from a team as a code owner September 25, 2025 12:16
@ilbertt
Copy link
Member Author

ilbertt commented Sep 26, 2025

After merging #4392, we should be able to fix tests here

@ilbertt ilbertt changed the title feat: set canister env in cookies for html files feat!: set canister env in cookies for html files Sep 26, 2025
@ilbertt ilbertt requested a review from sesi200 September 26, 2025 13:42
Copy link
Contributor

@sesi200 sesi200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a test that shows that PUBLIC_ env vars are added to the cookie?

@ilbertt
Copy link
Member Author

ilbertt commented Sep 26, 2025

Can you also add a test that shows that PUBLIC_ env vars are added to the cookie?

Adding them in a follow-up PR

@ilbertt ilbertt merged commit 2d287c5 into master Sep 26, 2025
132 checks passed
@ilbertt ilbertt deleted the luca/cookie-env-vars branch September 26, 2025 14:34
ilbertt added a commit that referenced this pull request Sep 26, 2025
After #4387, some methods already have two parameters (time and canister env) that can be condensed into a "system context". Using a system context simplifies the tests as well.

This PR introduces the `system_context` module and refactors the state methods to accept is as the last argument.

---------

Co-authored-by: Vivienne Siffert <severin.siffert@dfinity.org>
ilbertt added a commit that referenced this pull request Sep 26, 2025
ilbertt added a commit that referenced this pull request Oct 2, 2025
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