prevent slashtags from accessing disk
This commit is contained in:
parent
67509fe2be
commit
3c6c2a72b2
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd /var/app/staging
|
||||
sudo -u webapp npm install @synonymdev/slashtags-sdk@1.0.0-alpha.36
|
||||
sudo -u webapp npm install @synonymdev/slashtags-auth@1.0.0-alpha.5
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd /var/app/staging
|
||||
sudo -u webapp npm install @synonymdev/slashtags-sdk@1.0.0-alpha.36
|
||||
sudo -u webapp npm install @synonymdev/slashtags-auth@1.0.0-alpha.5
|
|
@ -1,6 +1,7 @@
|
|||
import models from '../models'
|
||||
import SDK, { SlashURL } from '@synonymdev/slashtags-sdk'
|
||||
import { Server } from '@synonymdev/slashtags-auth'
|
||||
import RAM from 'random-access-memory'
|
||||
|
||||
const HOUR = 1000 * 60 * 60
|
||||
|
||||
|
@ -19,7 +20,10 @@ async function createProfile (slashtag) {
|
|||
|
||||
const slashtags = global.slashtags || (() => {
|
||||
console.log('initing slashtags')
|
||||
const sdk = new SDK({ primaryKey: process.env.SLASHTAGS_SECRET ? Buffer.from(process.env.SLASHTAGS_SECRET, 'hex') : undefined })
|
||||
const sdk = new SDK({
|
||||
primaryKey: process.env.SLASHTAGS_SECRET ? Buffer.from(process.env.SLASHTAGS_SECRET, 'hex') : undefined,
|
||||
storage: new RAM()
|
||||
})
|
||||
|
||||
// Get the default slashtag
|
||||
const slashtag = sdk.slashtag()
|
||||
|
|
Loading…
Reference in New Issue