Close port 3001 from outside the VM (#109) #139
Merged
+6
−3
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.
Closes #109
What
The backend listens on
127.0.0.1instead of all network interfaces, so port 3001 can no longer be reached from outside the VM. The API is still available through Apache at/project2/graphql.Why nothing else changes
Apache (
ProxyPass),scripts/deploy.shanddocs/vm.mdalready use127.0.0.1:3001.Tests
npm run checkpasses.localhost:3001/graphqlstill opens Apollo Sandbox.curl http://it2810-18.idi.ntnu.no:3001/graphqlfrom another machine should fail, and the site should still work.Note
The backend not restarting is solved in #140: the deploy script now installs the systemd service.