File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- import Dependencies
1615import Vapor
1716
1817
@@ -23,12 +22,11 @@ public final class CFRayRouteLoggingMiddleware: Middleware {
2322 public init ( logLevel: Logger . Level = . info) {
2423 self . logLevel = logLevel
2524 }
26-
25+
2726 public func respond( to request: Request , chainingTo next: Responder ) -> EventLoopFuture < Response > {
2827 guard let cfray = request. headers. first ( name: " cf-ray " ) else {
2928 return next. respond ( to: request)
3029 }
31-
3230 request. logger [ metadataKey: " cf-ray " ] = . string( cfray)
3331 request. logger. log ( level: self . logLevel, " \( request. method) \( request. url. path. removingPercentEncoding ?? request. url. path) " )
3432 return next. respond ( to: request)
You can’t perform that action at this time.
0 commit comments