Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Jun 16, 2023
1 parent 1ad1c4d commit fe8b3f8
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 135 deletions.
6 changes: 4 additions & 2 deletions app/handlers/handle-upload.js
@@ -1,8 +1,10 @@
import assert from "node:assert";

import aws from "aws-sdk";
import uuid from "node-uuid";
import Blitline from "simple_blitline_node";
import {
v4 as uuidv4,
} from "uuid";

import configuration from "../lib/configuration.js";
import {
Expand Down Expand Up @@ -215,7 +217,7 @@ export default async function handleUpload(request, response) {

const imageContentType = request.query.filetype;
const extension = getExtensionFromInternetMediaType(imageContentType);
const generatedId = uuid.v4();
const generatedId = uuidv4();
const beforeKey = getBeforeKey(generatedId, extension);
const afterKey = getAfterKey(beforeKey);
const beforeUrl = getS3UrlFromKey(beforeKey);
Expand Down
3 changes: 2 additions & 1 deletion app/web.js
Expand Up @@ -35,12 +35,13 @@ const createExpressApp = (siteRootPath) => {
app.use(expressLogger);

app.use(helmet());
app.use(helmet.hsts({
app.use(helmet.strictTransportSecurity({
force: configuration.enableHsts === true,
includeSubDomains: true,
maxAge: 15_724_800_000,
}));
app.use(helmet.contentSecurityPolicy({

directives: {
...helmet.contentSecurityPolicy.getDefaultDirectives(),
"connect-src": [
Expand Down

0 comments on commit fe8b3f8

Please sign in to comment.