Skip to content
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

Add proxy middleware #33

Merged
merged 4 commits into from
Nov 4, 2023
Merged

Add proxy middleware #33

merged 4 commits into from
Nov 4, 2023

Conversation

wllmwu
Copy link
Member

@wllmwu wllmwu commented Nov 3, 2023

Changes

What changes did you make? Include screenshots if applicable, or explain how to view the changes.

  • Fix "Invalid options object" error on npm start by using http-proxy-middleware package instead of proxy line in package.json
  • Fix "Invalid options object" error when starting the frontend on some machines by using environment variables and CORS headers
  • Remove proxy line from frontend/package.json

Testing

How did you confirm your changes work? (Automated tests, manual verification, etc.)

  • Not sure how this has been tested -@wllmwu
  • Manually tested task creation on the frontend - new task appears in database as expected

Tracking

Add your issue number below.

No issue was created for this bug, see Changes above

@wllmwu wllmwu added bug Something isn't working frontend labels Nov 3, 2023
@wllmwu
Copy link
Member Author

wllmwu commented Nov 3, 2023

@navidboloorian Can you describe what you did to test this before I merge it?

@wllmwu
Copy link
Member Author

wllmwu commented Nov 3, 2023

@navidboloorian Can you describe what you did to test this before I merge it?

Never mind, I implemented a fix which I think is more likely to work across systems. Test it yourself when you review.

Comment on lines -117 to +124
const response = await fetchRequest("GET", url, body, headers);
const response = await fetchRequest("PUT", API_BASE_URL + url, body, headers);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navidboloorian This was a little sloppy tbh, I should have looked more closely when reviewing

Copy link
Contributor

@navidboloorian navidboloorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works on my system

@navidboloorian navidboloorian merged commit 9d3ca9f into main Nov 4, 2023
3 checks passed
@navidboloorian navidboloorian deleted the proxy-fix branch November 4, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants