-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose endpoint for google auth url #590
base: main
Are you sure you want to change the base?
Conversation
ssr/src/page/google_redirect.rs
Outdated
@@ -26,6 +26,18 @@ async fn google_auth_redirector() -> Result<(), ServerFnError> { | |||
Ok(()) | |||
} | |||
|
|||
#[server(endpoint = "google_auth_url", input = Json, output = Json)] | |||
async fn google_auth_url(host: String) -> Result<(), ServerFnError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we just use the host header? its still set if you use a http client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am was not sure if IOS have a mechanism to send host header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Host header is sent by all http clients, reverse proxies wouldnt work without it :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RFC 9110 https://httpwg.org/specs/rfc9110.html#field.host
"The target URI's authority information is critical for handling a request. A user agent MUST generate a Host header field in a request unless it sends that information as an ":authority" pseudo-header field"
Changes
Impact