Serve 404 on invalid route

parent d2064096
Pipeline #216 passed with stage
in 56 seconds
......@@ -40,4 +40,9 @@ describe PubRelay do
{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"id":"https://example.com/actor","type":"Service","preferredUsername":"relay","inbox":"https://example.com/inbox","publicKey":{"id":"https://example.com/actor#main-key","owner":"https://example.com/actor","publicKeyPem":#{pem_json}}}
HERE
end
it "returns 404" do
status_code, _ = request("GET", "/unknown")
status_code.should eq(404)
end
end
......@@ -33,6 +33,8 @@ class PubRelay
serve_actor(context)
when {"POST", "/inbox"}
handle_inbox(context)
else
call_next(context)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment