Skip to content

Update backend-only var and auth docs w.r.t. app security#1348

Merged
Alek99 merged 2 commits intomainfrom
masenf/backend-only-vars
May 6, 2025
Merged

Update backend-only var and auth docs w.r.t. app security#1348
Alek99 merged 2 commits intomainfrom
masenf/backend-only-vars

Conversation

@masenf
Copy link
Copy Markdown
Collaborator

@masenf masenf commented May 6, 2025

No description provided.

@larsblumberg
Copy link
Copy Markdown

Thank you for these valuable additions to the docs! I just learned about state_auto_setters in rxconfig.py which I will happily enable from now on to mitigate potential vulnerability threats

@masenf
Copy link
Copy Markdown
Collaborator Author

masenf commented May 6, 2025

state_auto_setters will be new in reflex 0.7.11 to be published next week.

just getting ahead of the docs update

@adhami3310
Copy link
Copy Markdown
Member

@larsblumberg we only merged that into main recently: reflex-dev/reflex#4480
it will be in 0.7.11!

@adhami3310
Copy link
Copy Markdown
Member

masen stop beating me to things >:( /s

@Alek99 Alek99 merged commit 4347a4b into main May 6, 2025
9 checks passed
@Alek99 Alek99 deleted the masenf/backend-only-vars branch May 6, 2025 22:22
@larsblumberg
Copy link
Copy Markdown

larsblumberg commented May 6, 2025

@larsblumberg we only merged that into main recently: reflex-dev/reflex#4480
it will be in 0.7.11!

No worries, I hacked my way around it, this works well:

api = Starlette()

@api.route("/publications/{nd_publication_id}")
@api.route("/publications/{nd_publication_id}/")
async def get_publication(request):
    ...

@asynccontextmanager
async def app_lifespan():
    ...

app = App()
app._api.mount("/api", api)
app.register_lifespan_task(app_lifespan)

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.

4 participants