898AWS S3, Vue and History Mode

Single-page Applications (SPA) make with Vue or React can take advantage of HTML5’s History Mode, where the URL in the browser window is changing – but all the changes are happening in the client. This works great, if the user only follows the links, but it breaks when the user wants to reload the page or goes to and unknown (404) page. The server kicks on and gives you a 404. There are ways to deal with this, vue-router has a list: https://router.vuejs.org/en/essentials/history-mode.html Basically, what’s happening: rewrite all requests to index.html – the entry point of your SPA. We will also have to deal with 404 on the client side, but that’s also described above. Origin -> Origins Path to path in S3. No need to adjust index and error paths in S3