blob: 08d7b5ec539129011606553df50efce7e6ee68c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
require_relative "helpers/compact_index"
class CompactIndexEtagMatch < CompactIndexAPI
get "/versions" do
raise "ETag header should be present" unless env["HTTP_IF_NONE_MATCH"]
headers "ETag" => env["HTTP_IF_NONE_MATCH"]
status 304
body ""
end
end
require_relative "helpers/artifice"
Artifice.activate_with(CompactIndexEtagMatch)
|