@rip-lang/server 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.rip +3 -2
package/package.json
CHANGED
package/server.rip
CHANGED
|
@@ -121,7 +121,7 @@ logAccessHuman = (app, req, res, totalSeconds, workerSeconds) ->
|
|
|
121
121
|
type = if contentType.includes('/') then contentType.split('/')[1] else contentType
|
|
122
122
|
console.log "[#{timestamp} #{timezone} #{d1} #{d2}] #{method} #{path} → #{status} #{type} #{len}"
|
|
123
123
|
|
|
124
|
-
INTERNAL_HEADERS = new Set(['rip-worker-busy', 'rip-worker-id'])
|
|
124
|
+
INTERNAL_HEADERS = new Set(['rip-worker-busy', 'rip-worker-id', 'rip-no-log'])
|
|
125
125
|
|
|
126
126
|
stripInternalHeaders = (h) ->
|
|
127
127
|
out = new Headers()
|
|
@@ -920,10 +920,11 @@ class Server
|
|
|
920
920
|
logAccessHuman(@flags.appName, req, res, totalSeconds, workerSeconds)
|
|
921
921
|
|
|
922
922
|
buildResponse: (res, req, start, workerSeconds) ->
|
|
923
|
+
silent = res.headers.get('rip-no-log') is '1'
|
|
923
924
|
headers = stripInternalHeaders(res.headers)
|
|
924
925
|
headers.delete('date')
|
|
925
926
|
@maybeAddSecurityHeaders(headers)
|
|
926
|
-
@logAccess(req, res, (performance.now() - start) / 1000, workerSeconds)
|
|
927
|
+
@logAccess(req, res, (performance.now() - start) / 1000, workerSeconds) unless silent
|
|
927
928
|
new Response(res.body, { status: res.status, statusText: res.statusText, headers })
|
|
928
929
|
|
|
929
930
|
forwardToWorker: (req, socket) ->
|