so the browsers will hopefully cache responses for 1h and reduce load on
the server.
a future version will propagate cache-control from upstream.
part of #3
previously, a request to an open graph image reported from say
https://github.com/example/some.repo would result in 404 not found, a
false negative because "is link in event?" verification would fail:
"some.repo" looks like a file with .repo extension, not an html page.
in this commit, if a client already requested example/some.repo
before, and it is cached, the response to the OGP image is successful.
the simplest approach at the moment: allow requests from all origins,
only GET and OPTIONS methods.
allowed headers are '*'. this prevents clients from providing
credentials via cookies which isn't used anyway. nuff cookies.
the meat is in Noxer struct, in noxy.go.
executable server entry point is in cmd/noxy/main.go.
all request responses are cached using a rudimentary filesystem
based caching. a max storage quota is not implemented yet.
the previous design was too complex to implement due its double
roundtrip: first JSON, then data.
in this new design, the client gets the data right away, single
roundtrip.