Commit 99efeb32 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'v0.8.4' into 'master'

Added specific cache header for gui resources.

See merge request nomad-lab/nomad-FAIR!140
parents 1995952d fb3d6f17
Pipeline #79944 passed with stages
in 21 minutes and 49 seconds
......@@ -12,9 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from flask import Blueprint
from flask import Blueprint, request
import os.path
gui_folder = os.path.abspath(os.path.join(
os.path.dirname(__file__), '../../gui/build'))
blueprint = Blueprint('gui', __name__, static_url_path='/', static_folder=gui_folder)
@blueprint.after_request
def add_header(response):
if request.url.endswith('index.html'):
response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
if request.url.endswith('.js'):
response.headers['Cache-Control'] = 'no-cache, must-revalidate'
return response
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment