Fix: Arduino on Cloud not accessible via /arduino route#26
Open
ImranFarhat01 wants to merge 1 commit into
Open
Fix: Arduino on Cloud not accessible via /arduino route#26ImranFarhat01 wants to merge 1 commit into
ImranFarhat01 wants to merge 1 commit into
Conversation
…t upgrade (Bug 7) Problem: - Arduino on Cloud was not accessible via http://localhost/arduino - Angular dev server served everything at root / instead of /arduino/, so nginx's location /arduino/ proxy_pass had nothing matching to serve - Nginx /arduino/ location lacked WebSocket upgrade headers needed for Angular's live-reload dev server over the proxy Fix: - arduino-frontend's start command now includes --base-href /arduino/ --serve-path /arduino/, so Angular correctly serves under that path - Added proxy_http_version 1.1 and Upgrade/Connection headers to the /arduino/ nginx location block Note: an earlier draft of this fix mistakenly applied the same --base-href /arduino/ flag to eda-frontend (a React app, not Angular), which would have broken eSim's frontend entirely. This fix only touches arduino-frontend's command, leaving eda-frontend untouched. Testing: - http://localhost/arduino loads the Arduino on Cloud editor correctly - http://localhost/eda still loads the eSim editor correctly (no regression)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Arduino on Cloud was not accessible via http://localhost/arduino.
Root Cause
so nginx's
location /arduino/proxy_pass had nothing matching to servefor Angular's live-reload dev server over the proxy
Fix
--base-href /arduino/ --serve-path /arduino/, so Angular correctlyserves under that path
/arduino/ nginx location block
Testing
regression - confirmed eda-frontend's command was left untouched,
since it's a React app and the base-href flag only applies to Angular)