mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-31 15:11:35 -05:00
* Draft: web-ui root endpoint x-frame-options: deny header * Switch to async * Simplify setting frame options header by using DefaultHeaders --------- Co-authored-by: timvisee <tim@visee.me>
27 lines
827 B
Bash
Executable File
27 lines
827 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
STATIC_DIR=${STATIC_DIR:-"./static"}
|
|
OPENAPI_FILE=${OPENAPI_DIR:-"./docs/redoc/master/openapi.json"}
|
|
|
|
# Download `dist.zip` from the latest release of https://github.com/qdrant/qdrant-web-ui and unzip given folder
|
|
|
|
# Get latest dist.zip, assume jq is installed
|
|
DOWNLOAD_LINK=$(curl --silent "https://api.github.com/repos/qdrant/qdrant-web-ui/releases/latest" | jq -r '.assets[] | select(.name=="dist-qdrant.zip") | .browser_download_url')
|
|
|
|
if command -v wget &> /dev/null
|
|
then
|
|
wget -O dist-qdrant.zip $DOWNLOAD_LINK
|
|
else
|
|
curl -L -o dist-qdrant.zip $DOWNLOAD_LINK
|
|
fi
|
|
|
|
rm -rf "${STATIC_DIR}/"*
|
|
unzip -o dist-qdrant.zip -d "${STATIC_DIR}"
|
|
rm dist-qdrant.zip
|
|
cp -r "${STATIC_DIR}/dist/"* "${STATIC_DIR}"
|
|
rm -rf "${STATIC_DIR}/dist"
|
|
|
|
cp "${OPENAPI_FILE}" "${STATIC_DIR}/openapi.json"
|