Skip to content

Commit

Permalink
Don't allow caching of the index (#201)
Browse files Browse the repository at this point in the history
* dont allow caching the index page

* only delegate to the JS if we know it should handle it (we want to see the 404s!)
  • Loading branch information
rloomans committed Sep 9, 2016
1 parent c248563 commit 508edf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion measure_mate/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
url(r'^export/', export_data, name='export'),
url(r'^favicon\.ico', RedirectView.as_view(url=staticfiles_storage.url('assets/favicon.ico')), name='favicon'),
url(r'^robots\.txt', robots_txt, name='robots'),
url(r'^.*$', home, name='home'),
url(r'^(?:about|assessment|team|)(?:/|$)', home, name='home'),
]
2 changes: 2 additions & 0 deletions measure_mate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def schema_view(request):


@x_ua_compatible('IE=edge')
@header('Cache-control', 'no-cache')
def home(request):
return render(request, 'index.html')

Expand All @@ -40,6 +41,7 @@ def export_data(request):
'xls', file_name=('measure_mate_export_%s' % timestamp))


@header('Cache-control', 'no-cache')
def healthcheck(request):
return HttpResponse('ok', content_type='text/plain')

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
"gulp-uglify": "^2.0.0",
"gulp-uglifycss": "^1.0.6",
"gulp-util": "^3.0.7",
"history": "^3.2.0",
"history": "^4.0.0-1",
"http-status-codes": "^1.0.6",
"jquery": "^3.1.0",
"lodash": "^4.15.0",
"lodash.assign": "^4.2.0",
"loglevel": "^1.4.1",
"markdownlint": "^0.2.0",
"moment": "^2.14.1",
"plotly.js": "^1.16.3",
"plotly.js": "^1.17.0",
"pretty-hrtime": "^1.0.2",
"react": "^15.3.1",
"react-bootstrap": "^0.30.2",
Expand Down

0 comments on commit 508edf4

Please sign in to comment.