Skip to content

Conversation

samuller
Copy link
Contributor

@samuller samuller commented Oct 5, 2025

Motivation

When using app.storage.user it creates a session cookie with permissions that disallow cross-origin usage. While this is a good secure default, there's currently no way to override it when needed, e.g. if you want your NiceGUI site to be embeddable as an iframe from another domain. See discussion #4252.

Implementation

A new argument is added to ui.run() which allows passing keyword arguments that will be forwarded to the SessionMiddleware that is used to create the session cookie.

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • The implementation is complete.
  • Pytests have been added (or are not necessary).
  • Documentation has been added (or is not necessary).

@falkoschindler falkoschindler self-requested a review October 6, 2025 09:14
@falkoschindler falkoschindler added this to the 3.1 milestone Oct 6, 2025
@falkoschindler falkoschindler added feature Type/scope: New feature or enhancement review Status: PR is open and needs review labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Type/scope: New feature or enhancement review Status: PR is open and needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants