Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Mar 8, 2025
1 parent e91d1ad commit b67cb2c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion routes/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function(req, res, next){
res.set('Cache-Control', `public, max-age=60, stale-while-revalidate=${cdn_cache}`);

if(doc){
const revision = 15; // bump to invalidate all caches
const revision = 16; // bump to invalidate all caches
const etag = `W/"${doc._id}${revision}"`;
const date = new Date(doc._published.getTime() + revision * 1000).toUTCString();
res.set('ETag', etag);
Expand Down
5 changes: 1 addition & 4 deletions routes/universe.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ function get_contrib_data(user, max = 20){
//See https://github.com/r-universe-org/help/issues/574
function send_s3_list(req, res){
if(req.query['x-id'] == 'ListBuckets'){
return res.type('application/xml').render('S3Bucket');
}
if(req.query['list-type'] != '2'){
throw createError(400, "Only list-type=2 is supported");
throw createError(400, "Please use virtual hosted style buckets on r-universe.dev TLD");
}
var universe = res.locals.universe;
var delimiter = req.query['delimiter'];
Expand Down
7 changes: 0 additions & 7 deletions views/S3Bucket.pug

This file was deleted.

0 comments on commit b67cb2c

Please sign in to comment.