Merge branch 'develop' of github.com:thecodingmachine/workadventure into oidcProfile
This commit is contained in:
+4
-2
@@ -1,8 +1,10 @@
|
||||
# protobuf build
|
||||
FROM node:14.18.2-buster-slim@sha256:20bedf0c09de887379e59a41c04284974f5fb529cf0e13aab613473ce298da3d as builder
|
||||
WORKDIR /usr/src
|
||||
COPY messages/yarn.lock messages/package.json ./
|
||||
RUN yarn install
|
||||
COPY messages .
|
||||
RUN yarn install && yarn proto
|
||||
RUN yarn proto
|
||||
|
||||
# typescript build
|
||||
FROM node:14.18.2-buster-slim@sha256:20bedf0c09de887379e59a41c04284974f5fb529cf0e13aab613473ce298da3d as builder2
|
||||
@@ -19,9 +21,9 @@ RUN yarn run tsc
|
||||
FROM node:14.18.2-buster-slim@sha256:20bedf0c09de887379e59a41c04284974f5fb529cf0e13aab613473ce298da3d
|
||||
WORKDIR /usr/src
|
||||
COPY pusher/yarn.lock pusher/package.json ./
|
||||
COPY --from=builder2 /usr/src/dist /usr/src/dist
|
||||
ENV NODE_ENV=production
|
||||
RUN yarn install --production
|
||||
COPY --from=builder2 /usr/src/dist /usr/src/dist
|
||||
|
||||
USER node
|
||||
CMD ["yarn", "run", "runprod"]
|
||||
|
||||
@@ -84,11 +84,13 @@ export class AdminController extends BaseController {
|
||||
|
||||
if (ADMIN_API_TOKEN === "") {
|
||||
res.writeStatus("401 Unauthorized").end("No token configured!");
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
if (token !== ADMIN_API_TOKEN) {
|
||||
console.error("Admin access refused for token: " + token);
|
||||
res.writeStatus("401 Unauthorized").end("Incorrect token");
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user