Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@parse/gcs-files-adapter
Advanced tools
The Parse Server Google Cloud Storage Adapter.
npm install --save @parse/gcs-files-adapter
{
// Parse server options
appId: 'my_app_id',
masterKey: 'my_master_key',
// other options
filesAdapter: {
module: '@parse/gcs-files-adapter',
options: {
projectId: 'projectId',
keyFilename: '/path/to/keyfile',
bucket: 'my_bucket',
// optional:
bucketPrefix: '', // default value
directAccess: false // default value
}
}
}
Set your environment variables:
GCP_PROJECT_ID=projectId
GCP_KEYFILE_PATH=/path/to/keyfile
GCS_BUCKET=bucketName
And update your config / options
{
// Parse server options
appId: 'my_app_id',
masterKey: 'my_master_key',
// other options
filesAdapter: '@parse/gcs-files-adapter'
}
Alternatively, you can use
GCLOUD_PROJECT
and GOOGLE_APPLICATION_CREDENTIALS
environment variables.
var GCSAdapter = require('@parse/gcs-files-adapter');
var gcsAdapter = new GCSAdapter(
'project',
'keyFilePath',
'bucket' , {
bucketPrefix: '',
directAccess: false
}
);
var api = new ParseServer({
appId: 'my_app',
masterKey: 'master_key',
filesAdapter: gcsAdapter
})
or with an options hash
var GCSAdapter = require('@parse/gcs-files-adapter');
var gcsOptions = {
projectId: 'projectId',
keyFilename: '/path/to/keyfile',
bucket: 'my_bucket',
bucketPrefix: '',
directAccess: false
}
var gcsAdapter = new GCSAdapter(gcsOptions);
var api = new ParseServer({
appId: 'my_app',
masterKey: 'master_key',
filesAdapter: gcsAdapter
});
directAccess
: if set to true
, uploaded files will be set as public and files will be served directly by Google Cloud Storage. Default is false
and files are proxied by Parse Server.See the Google Cloud documentation for how to generate a key file with credentials.
FAQs
Google Cloud Storage adapter for parse-server
The npm package @parse/gcs-files-adapter receives a total of 263 weekly downloads. As such, @parse/gcs-files-adapter popularity was classified as not popular.
We found that @parse/gcs-files-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.