File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed
server/src/main/java/org/eclipse/openvsx
webui/src/pages/extension-detail Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -894,7 +894,7 @@ public ResponseEntity<ReviewListJson> getReviews(
894894 for (var registry : getRegistries ()) {
895895 try {
896896 return ResponseEntity .ok ()
897- .cacheControl (CacheControl .maxAge ( 10 , TimeUnit . MINUTES ).cachePublic ())
897+ .cacheControl (CacheControl .noCache ( ).cachePublic ())
898898 .body (registry .getReviews (namespace , extension ));
899899 } catch (NotFoundException exc ) {
900900 // Try the next registry
@@ -1012,7 +1012,7 @@ public ResponseEntity<SearchResultJson> search(
10121012 }
10131013
10141014 return ResponseEntity .ok ()
1015- .cacheControl (CacheControl .maxAge ( 10 , TimeUnit . MINUTES ).cachePublic ())
1015+ .cacheControl (CacheControl .noCache ( ).cachePublic ())
10161016 .body (result );
10171017 }
10181018
Original file line number Diff line number Diff line change 1515public class ShallowEtagHeaderFilter extends org .springframework .web .filter .ShallowEtagHeaderFilter {
1616
1717 protected boolean shouldNotFilter (HttpServletRequest request ) throws ServletException {
18- // limit the filter to /api/{namespace}/{extension}, /api/{namespace}/details
19- // and /api/{namespace}/{extension}/{version} endpoints
18+ // limit the filter to /api/{namespace}/{extension}, /api/{namespace}/details,
19+ // /api/{namespace}/{extension}/{version}, and /api/-/search endpoints
2020 var path = request .getRequestURI ().substring (1 ).split ("/" );
21- var applyFilter = path .length == 3 || path .length == 4 ;
22- if (applyFilter ) {
23- applyFilter = path [0 ].equals ("api" ) && !path [1 ].equals ("-" );
24- }
25- if (applyFilter && path .length == 4 ) {
26- applyFilter = !(path [3 ].equals ("review" ) || path [3 ].equals ("reviews" ));
21+ var applyFilter = (path .length == 3 || path .length == 4 ) && path [0 ].equals ("api" );
22+ if (applyFilter && path [1 ].equals ("-" )) {
23+ applyFilter = path [2 ].contains ("search" );
2724 }
2825
2926 return !applyFilter ;
Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ class ExtensionReviewDialogComponent extends React.Component<ExtensionReviewDial
109109 return null ;
110110 }
111111 return < React . Fragment >
112- < Button variant = 'contained' color = 'secondary' onClick = { this . handleOpenButton } >
112+ { ! this . state . posted && ( < Button variant = 'contained' color = 'secondary' onClick = { this . handleOpenButton } >
113113 Write a Review
114- </ Button >
114+ </ Button > ) }
115115 < Dialog open = { this . state . open } onClose = { this . handleCancel } >
116116 < DialogTitle > { this . props . extension . displayName || this . props . extension . name } Review</ DialogTitle >
117117 < DialogContent >
You can’t perform that action at this time.
0 commit comments