Added ability to block storage requests on frontend

This commit is contained in:
subnub
2020-05-10 21:42:32 -04:00
parent 843c86a56f
commit caf93aaa8f
3 changed files with 7 additions and 1 deletions
+4
View File
@@ -12,6 +12,10 @@ export const startSetStorage = () => {
return (dispatch) => {
if (env.disableStorage === "true") {
return;
}
const config = {
headers: {'Authorization': "Bearer " + window.localStorage.getItem("token")}
};
+1
View File
@@ -2,6 +2,7 @@ const env = {
port: process.env.PORT,
url: process.env.REMOTE_URL,
enableVideoTranscoding: process.env.ENABLE_VIDEO_TRANSCODING,
disableStorage: process.env.DISABLE_STORAGE
}
export default env;
+2 -1
View File
@@ -75,7 +75,8 @@ module.exports = (env) => {
new webpack.DefinePlugin({
"process.env.PORT": JSON.stringify(process.env.PORT),
"process.env.REMOTE_URL": JSON.stringify(process.env.REMOTE_URL),
"process.env.ENABLE_VIDEO_TRANSCODING": JSON.stringify(process.env.ENABLE_VIDEO_TRANSCODING)
"process.env.ENABLE_VIDEO_TRANSCODING": JSON.stringify(process.env.ENABLE_VIDEO_TRANSCODING),
"process.env.DISABLE_STORAGE": JSON.stringify(process.env.DISABLE_STORAGE)
}),
new CompressionPlugin()
],