Skip to content

Commit

Permalink
modify: configs
Browse files Browse the repository at this point in the history
  • Loading branch information
zinirun committed Mar 14, 2021
1 parent 7a17f3d commit 402ba9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ http {
listen 80;

location /auth {
proxy_pass http://app:4000;
proxy_pass http://app;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -20,7 +20,7 @@ http {
}

location /graphql {
proxy_pass http://app:4000;
proxy_pass http://app;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/config/uri.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const SERVER_ADDR: string = 'http://zini.work:4000';
const LOGOUT: string = '/auth/logout';

export { SERVER_ADDR, LOGOUT };
export { LOGOUT };
3 changes: 1 addition & 2 deletions frontend/src/header/components/OAuthMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react';
import { Menu } from 'antd';
import { FacebookOutlined, GithubOutlined, GoogleOutlined } from '@ant-design/icons';
import { SERVER_ADDR } from '../../config/uri.config';

type AuthSource = 'google' | 'facebook' | 'github';

export default function OAuthMenu() {
const handleOAuthLogin = (authSource: AuthSource) => {
window.location.href = `${SERVER_ADDR}/auth/${authSource}`;
window.location.href = `/auth/${authSource}`;
};
return (
<Menu>
Expand Down

0 comments on commit 402ba9a

Please sign in to comment.