Skip to content

Commit

Permalink
feat: nginx add gotrue path rewrite (AppFlowy-IO#121)
Browse files Browse the repository at this point in the history
* feat: nginx add gotrue path rewrite

* fix: prefix gotrue for gotrue url
  • Loading branch information
speed2exe authored Oct 17, 2023
1 parent d638c01 commit ebc2e7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin_frontend/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>Admin Login</h1>

<div id="oauth2Login">
<p>Or login with:</p>
<a href="/authorize?provider=google&redirect_to=/web/login">Google</a>
<a href="/gotrue/authorize?provider=google&redirect_to=/web/login">Google</a>
</div>

<script>
Expand Down
5 changes: 3 additions & 2 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ http {
listen 80;
listen 443 ssl;

# GoTrue
location ~ ^/(verify|authorize|callback|settings|user|token|admin) {
# GoTrue
location /gotrue/ {
rewrite ^/gotrue(/.*)$ $1 break;
proxy_pass http://gotrue:9999;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn localhost_client() -> Client {

pub const DEV_URL: &str = "https://test.appflowy.cloud";
pub const DEV_WS: &str = "wss://test.appflowy.cloud/ws";
pub const DEV_GOTRUE: &str = "https://test.appflowy.cloud";
pub const DEV_GOTRUE: &str = "https://test.appflowy.cloud/gotrue";

#[allow(dead_code)]
pub fn test_appflowy_cloud_client() -> Client {
Expand Down

0 comments on commit ebc2e7e

Please sign in to comment.