Cyrus
SSolara
•Created by commodity-pilled on 1/24/2024 in #questions-issues
Setting favicon in browser?
@MaartenBreddels I am having the same issue.
favicon
is still the default and the style only gets picked up if I add
solara.Style('/my/local/path/to/style.css')
to my pages.__init__.py
. My directory structure currently looks something like
I am also using a pyproject.toml
to install the myapp package. Am I missing something? I tried moving assets
one level up but that did not work either5 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
Sure, will test now and reply in the issue.
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
It worked!! I definitely think a note about
FORWARDED_ALLOW_IPS='*'
should be documented in the solara auth page (or even set by default to '*'
within solara server?)37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
setting
ALLOW_FORWARDED_IPS=1
didn't work. The redirect uri based on request.base_url
reverted back to http
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
@MaartenBreddels Would you like me to create a (tiny) PR for this?
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
OK, so with my own custom
login
function I was able to fix the problem by implementing the bug fix suggested in the issue. I was also able to add print statements and verify that indeed request.base_url
is using http
compared to settings.main.base_url
. I also printed headers confirming that the ALB is forwarding things correctly (with 'x-forwarded-proto': 'https'
):
So it looks like it was the bug that we discussed above37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
Ah, to print
request
before I just modified solara source code locally. For the remote version connected to the ALB I can try embedding my solara app in Starlette and then overwriting the _solara/auth/login
route to point to a custom endpoint in the app with logging statements. Will let you know how it goes.37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
you can see the
":scheme": "https",
in the request header but then http
in the response location redirect_uri, which doesn't align with the redirect uris allowed in the app, thus breaking the auth flow37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
I was able to grab the OAuth2 authorization request/response headers from chrome dev tool. The request chain starts when I click on my app's Login button (which href's to
auth.get_login_url
).
The first request is (using placeholders to hide some stuff):
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
It is a AWS Application Load Balancer (ALB) configured to listen for https requests (the security group only accepts https). I am not too knowledgeable about infra but I think the
X-Forwarded-Proto
header should automatically be forwarded in our setup to indicate the protocol used by the client.37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
@MaartenBreddels I created an issue
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
In my case the app should not be going through a proxy, because it's hosted within a VPC but maybe the load balancer can affect headers and what not. I am happy to open an issue about the bug!
37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
Shouldn't the login endpoint here be using
session.main.base_url
instead of request.base_url
? When I set SOLARA_BASE_URL then settings.main.base_url
correctly updates, while request.base_url
doesn't37 replies
SSolara
•Created by Cyrus on 8/19/2024 in #questions-issues
Force solara to use https in redirect uris
Given this scope (with 'scheme': 'http') I think then here my url gets defaulted to have 'http' sheme?
37 replies