Adjusting Production Server to Drop index.html from Route

We have a client that currently has their frontend server configured to force and/or redirect traffic to the full index.html endpoint of their web app. This method is incompatible with the Next.js/Modern React application we are currently building for them as it conflicts with how these frameworks handle internal routing. At a high level, when a user logs into production at https://example.clientname.com:8082/index.html, the app attempts to route the user internally to the root authenticated route at https://example.clientname.com:8082/?group, and the server then attempts to add the index.html extension https://example.clientname.com:8082/index.html/?group, which causes a full page reload.

Normally this wouldn’t be a big issue, but because Milestone’s SDK does not save login sessions across page loads, it then detects an unauthenticated user and redirects back to the root url to login again, causing a loop.

Both the client’s current site and Milestone’s branded site get around this issue by using hash location routing. The apps append a # to the end of all urls, the server ignores anything after the hash while the app itself is able to read the full url and route the user internally to the page view requested, https://example.clientname.com:8082/index.html#/?group or https://example.clientname.com:8082/index.html#/cameras

We do not want to use a hash routing method since most React frameworks do not even offer it anymore, including Next.js. Hash routing is also an outdated method of routing for single page applications.

Our question is: Is Milestone able to adjust the production server to drop the index.html from the route? This would resolve a login issue we are currently experiencing for our app. Or, is such a set up a requirement imposed by the Milestone server?

Hello Michael,

Unfortunately, the current version of the Milestone web client does not support the ability to drop index.html from the route. The server is configured to always redirect to index.html, and this behavior is part of the web client’s current design.

As a result, this setup is required and cannot be adjusted on the server side at this time.