parent
8e92e1097e
commit
b4ec8adf9c
|
@ -4,7 +4,7 @@ RUN apk update && apk add bash
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
RUN adduser -D -g '' r
|
RUN adduser -D -g '' r
|
||||||
RUN chmod a+x /root/.nimble/bin/nimble
|
RUN chmod a+x /opt/Nim/bin/nim
|
||||||
|
|
||||||
ADD . /app
|
ADD . /app
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ proc `%`(why: string): JsonNode =
|
||||||
|
|
||||||
template httpReply(code, body: expr): expr =
|
template httpReply(code, body: expr): expr =
|
||||||
## Make things a lot simpler for replies, etc.
|
## Make things a lot simpler for replies, etc.
|
||||||
if request.headers["X-API-Options"] == "bare" or @"options" == "bare":
|
if request.headers.getOrDefault("X-API-Options") == "bare" or @"options" == "bare":
|
||||||
# New "bare" reply format, easier to scrape, etc.
|
# New "bare" reply format, easier to scrape, etc.
|
||||||
resp code, myHeaders, pretty(%body, 4)
|
resp code, myHeaders, pretty(%body, 4)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue