ipfsproxy: fix typos in comments
License: MIT Signed-off-by: Hector Sanjuan <code@hector.link>
This commit is contained in:
parent
80bb66e029
commit
6bda1e340b
|
@ -132,14 +132,14 @@ func (proxy *Server) copyHeadersFromIPFSWithRequest(
|
|||
}
|
||||
|
||||
// setHeaders sets some headers for all hijacked endpoints:
|
||||
// - First we fix CORs headers by making an OPTIONS request to IPFS with the
|
||||
// - First, we fix CORs headers by making an OPTIONS request to IPFS with the
|
||||
// same Origin. Our objective is to get headers for non-preflight requests
|
||||
// only (the ones we hijack).
|
||||
// - Second we add any of the one-time-extracted headers that we deem necessary
|
||||
// or the user needs from IPFS (in case of custom headers), or i by ours.
|
||||
// - Second, we add any of the one-time-extracted headers that we deem necessary
|
||||
// or the user needs from IPFS (in case of custom headers).
|
||||
// This may trigger a single POST request to ExtractHeaderPath if they
|
||||
// were not extracted before.
|
||||
// - Third we set our own headers.
|
||||
// were not extracted before or TTL has expired.
|
||||
// - Third, we set our own headers.
|
||||
func (proxy *Server) setHeaders(dest http.Header, srcRequest *http.Request) {
|
||||
proxy.setCORSHeaders(dest, srcRequest)
|
||||
proxy.setAdditionalIpfsHeaders(dest, srcRequest)
|
||||
|
|
|
@ -492,7 +492,7 @@ func (proxy *Server) repoStatHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// slashHandler returns a handler which converts a /a/b/c/<argument> request
|
||||
// into an /a/b/c/<argument>/?arg=<argument> one. And uses the given origHandler
|
||||
// into an /a/b/c/<argument>?arg=<argument> one. And uses the given origHandler
|
||||
// for it. Our handlers expect that arguments are passed in the ?arg query
|
||||
// value.
|
||||
func slashHandler(origHandler http.HandlerFunc) http.HandlerFunc {
|
||||
|
|
Loading…
Reference in New Issue
Block a user