We have an application that is IP restricted via an .htaccess file. Another application is used to request access and updates the .htaccess with the users IP for a period of time.
The current server configuration uses just one box, so it is easy to update the htaccess. However we are looking at moving the application to a scale-able environment which means the htaccess will be on multiple servers rather than just one.
I was thinking an access file could be updated in the nginx load balancer (which will be the single point of entry before the servers). However after some research it looks like htaccess type files don't exist on nginx and the second problem is, other applications will exist on the server that are not IP restricted.
One potential workaround is to have the access tokens based on the application database, but I'd rather not make any application changes at the moment if possible.
Can anyone advise on other ways to allow users to request access to an application for a set period of time?