Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
1923e54e
Commit
1923e54e
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
headers to disable query caching added
parent
6b2a11b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!724
Merge 12.2.1
,
!723
12.2.1 into master
,
!722
remove comment is disabled for users without proper privileges
Pipeline
#9567
passed
6 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG
+2
-0
2 additions, 0 deletions
CHANGELOG
web/src/main/java/lcsb/mapviewer/web/bean/utils/ApiAccessControlFilter.java
+6
-1
6 additions, 1 deletion
...lcsb/mapviewer/web/bean/utils/ApiAccessControlFilter.java
with
8 additions
and
1 deletion
CHANGELOG
+
2
−
0
View file @
1923e54e
...
...
@@ -8,6 +8,8 @@ minerva (12.2.1) stable; urgency=medium
privileges (#766)
* Bug fix: invalid pubmed identifier could break clicking on element
containing it (#764, #765, #769)
* Bug fix: cache for API queries is explicitly disabled - some queries could
be mistakenly cached and the system behaviour might get unstable (#771)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 1 Apr 2019 17:00:00 +0200
...
...
This diff is collapsed.
Click to expand it.
web/src/main/java/lcsb/mapviewer/web/bean/utils/ApiAccessControlFilter.java
+
6
−
1
View file @
1923e54e
...
...
@@ -13,7 +13,7 @@ import javax.servlet.http.HttpServletResponse;
import
org.apache.log4j.Logger
;
/**
* This filter
en
ables
x-frames from another domain if necessary
.
* This filter
dis
ables
caching for API queries
.
*
* @author Piotr Gawron
*
...
...
@@ -33,7 +33,12 @@ public class ApiAccessControlFilter implements Filter {
public
void
doFilter
(
ServletRequest
req
,
ServletResponse
res
,
FilterChain
chain
)
throws
IOException
,
ServletException
{
HttpServletResponse
response
=
(
HttpServletResponse
)
res
;
//caching on Safari
response
.
addHeader
(
"Vary"
,
"*"
);
// generic cache prevent mechanism
response
.
addHeader
(
"Cache-Control"
,
"no-cache, no-store, must-revalidate"
);
response
.
addHeader
(
"Pragma"
,
"no-cache"
);
response
.
addHeader
(
"Expires"
,
"0"
);
chain
.
doFilter
(
req
,
response
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment