Skip to content

Commit 8a064a1

Browse files
authored
Merge pull request #268 from CodeForPhilly/267-fix
Removed explicit port 5000 and http://localhost from React API requests.
2 parents b96d14b + e650012 commit 8a064a1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/client/src/components/Login/Login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function checkLoginResponse(response) {
1212

1313

1414
async function loginUser(credentials) {
15-
return fetch('http://localhost:5000/api/user/login', {
15+
return fetch('/api/user/login', {
1616
method: 'POST',
1717
headers: {
1818
'Content-Type': 'application/json'

src/client/src/components/Refresh.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default async function Refresh(old_token) {
22

33
// Use exisiting token to get a new fresh token
44

5-
const new_at = await fetch('http://localhost:5000/api/user/refresh',
5+
const new_at = await fetch('/api/user/refresh',
66
{
77
method: 'GET',
88
headers: {

src/client/src/pages/Check/Check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function Check({access_token}) {
3535

3636
function authCheck() {
3737
// console.log('authCheck startfetch @ ' + DateTime.local().toFormat('HH:mm:ss.SSS'))
38-
fetch('http://localhost:5000/api/user/test_auth',
38+
fetch('/api/user/test_auth',
3939
{
4040
method: 'GET',
4141
headers: {

0 commit comments

Comments
 (0)