diff --git a/nginx/nexus-pos.conf b/nginx/nexus-pos.conf index 981fd5b..1c9195f 100644 --- a/nginx/nexus-pos.conf +++ b/nginx/nexus-pos.conf @@ -74,7 +74,7 @@ server { } location = / { - return 302 /pos/login; + return 302 /pos/login?v=34; } location / { diff --git a/pos/app.py b/pos/app.py index 8c2d8ee..3323b21 100644 --- a/pos/app.py +++ b/pos/app.py @@ -145,6 +145,14 @@ def create_app(): @app.route('/pos/login') def pos_login(): + # Bust browser cache by always serving the login page under a versioned URL. + if request.args.get('v') != '34': + response = make_response(redirect('/pos/login?v=34')) + response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, max-age=0' + response.headers['Pragma'] = 'no-cache' + response.headers['Expires'] = '0' + return response + response = make_response(render_template('login.html', tenant_id=getattr(g, 'tenant_id', None), tenant_name=getattr(g, 'tenant_name', None),