I've just put a new Spring Boot application on aws via elastic beanstalk. The app has its own static website that it hosts. When I run it locally I can go to localhost:5000
and it redirects me to localhost:5000/index.html
which then rewrites the url for me with React router to display my login page at localhost:5000/login
.
In AWS, though, accessing the root url my-app.us-west-2.elasticbeanstalk.com
returns a 403 access denied, which is presumably due to my Spring Security config, except I don't get why it isn't redirecting to my-app.us-west-2.elasticbeanstalk.com/index.html
like I would expect.
What's the easiest way to fix this? This is just for a demo, so I'm more interested in easiest than the best long term solution.