animusater
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
@MaartenBreddels @mariobuikhuizen Any thoughts on this?
12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
These issues persist even when using
SOLARA_BASE_URL="http://domain.com/solara-app/"
and SOLARA_ROOT_PATH="/solara-app"
.12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
Well, it seems I can resolve the authlib issue if I also include the middleware in the Startlette instantiation:
app = Starlette(routes=routes, middleware=solara.server.starlette.middleware)
.
However, I notice a few issues:
1. Our paths in the app are setup automatically based on the directory structure. However, when mounted to a different endpoint (e.g. /solara-app
), the paths within the app still try to resolve http://domain.com
. That is, if I go to the URL http://domain.com/solara-app
, and then click the link to take me to Page1, the link does not point to http://domain.com/solara-app/page1
, but instead http://domain.com/page1
. Weirdly, this works. However, if you refresh the page, we get a Page not found by Solara router
error.
2. Images, or custom static content, do not seem to work when the Solara app is not root. Images still try to get resolved to http://domain.com/static/public/image.png
and not http://domain.com/solara-app/static/public/image.png
.12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
There is no proxy server running at the moment. This is completely local right now.
12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
Hey Maarten. Running with just
solara run ... --root-path=/solara-app
opens a window where the app is loaded at the base url, e.g. http://domain.com
. If I then go to http://domain.com/solara-app
, where the app should be mounted, I get forwarded to http://domain.com/solara-app/solara-app
and the message Page not found by Solara router
appears on the page.12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
Unfortunately, this did not seem to be the issue. Also tried private mode, and different browsers, to no avail.
12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
Although, if you're referring to mounting no the Starlette app, we did seem to fix the middle ware issue. However, we cannot seem to get past a CSRF warning:
We had thought this may have to do with the
secret_key
passed to the session middleware, but we've tried using some random string, SOLARA_OAUTH_CLIENT_SECRET
, and SOLARA_SESSION_SECRET_KEY
, but it still seems to prevent using Solara Enterprise authentication correctly.12 replies
SSolara
•Created by animusater on 10/31/2024 in #questions-issues
Solara not respecting different root path
Hey Mario. Yeah, we're currently on 1.40 and are seeing this issue.
12 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
Or, in general, can we assume that anything instances within the
pages
directory is local to the browser, while things outside are app-level global?10 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
I see that in the
auth
handling, the Reactive
variable is passed a key pointing to solara-enterprise.auth.user
, is this the way to have a globally accessible variable that's scoped to a local user?10 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
Hmm, what variables in general would be scoped to a specific user? Only those defined on a single page? What about an app state specific to the user, something that doesn't live on a single page but is reference/imported by several?
10 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
We reassign using
set
: some_value.set(...)
.10 replies
SSolara
•Created by animusater on 6/14/2024 in #questions-issues
"Global" variables, scoped to user
Hmm, that's not what we're seeing. In a solara app hosted on AWS, using
solara-auth
to manage logged-in users, if a reactive variable is defined outside a Page
(that is, at the top-level e.g. some_var = solara.reactive(0)
), that value is changed for every user currently logged in and using the app.10 replies