mirror of
https://github.com/xwiki-labs/cryptpad-docker.git
synced 2024-11-22 10:25:03 +00:00
hide server tokens
This commit is contained in:
parent
76057146a6
commit
00e89ec449
2 changed files with 6 additions and 2 deletions
|
@ -33,8 +33,9 @@ RUN set -x \
|
|||
# Copy nginx conf from official image
|
||||
COPY --from=nginx:latest /etc/nginx /etc/nginx
|
||||
|
||||
# Debian uses www-data user instead of nginx
|
||||
RUN sed -i 's@\(^user\).*[^;]@\1 www-data@' /etc/nginx/nginx.conf
|
||||
# Change nginx and disable server tokens
|
||||
RUN sed -i -e 's@\(^user\).*[^;]@\1 www-data@' \
|
||||
-e "/default_type/a \\ server_tokens off;" /etc/nginx/nginx.conf
|
||||
|
||||
# Copy cryptpad with installed modules
|
||||
COPY --from=build --chown=cryptpad /cryptpad /cryptpad
|
||||
|
|
|
@ -34,6 +34,9 @@ RUN set -x \
|
|||
# Copy nginx conf from official image
|
||||
COPY --from=nginx:latest /etc/nginx /etc/nginx
|
||||
|
||||
# Disable server tokens
|
||||
RUN sed -i "/default_type/a \\ server_tokens off;" /etc/nginx/nginx.conf
|
||||
|
||||
# Copy cryptpad with installed modules
|
||||
COPY --from=build --chown=cryptpad /cryptpad /cryptpad
|
||||
|
||||
|
|
Loading…
Reference in a new issue