Skip to content

Fix: Arduino on Cloud not accessible via /arduino route#26

Open
ImranFarhat01 wants to merge 1 commit into
FOSSEE:developfrom
ImranFarhat01:fix/arduino-nginx-route-clean
Open

Fix: Arduino on Cloud not accessible via /arduino route#26
ImranFarhat01 wants to merge 1 commit into
FOSSEE:developfrom
ImranFarhat01:fix/arduino-nginx-route-clean

Conversation

@ImranFarhat01

Copy link
Copy Markdown

Problem

Arduino on Cloud was not accessible via http://localhost/arduino.

Root Cause

  • Angular dev server served everything at root / instead of /arduino/,
    so nginx's location /arduino/ proxy_pass had nothing matching to serve
  • nginx's /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

Testing

  • http://localhost/arduino loads the Arduino on Cloud editor correctly
  • http://localhost/eda still loads the eSim editor correctly (no
    regression - confirmed eda-frontend's command was left untouched,
    since it's a React app and the base-href flag only applies to Angular)

…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant