2016-09-13 18:20:44 +03:00
|
|
|
{
|
|
|
|
"url": "http://localhost:2368",
|
|
|
|
"server": {
|
|
|
|
"host": "127.0.0.1",
|
|
|
|
"port": 2368
|
|
|
|
},
|
2019-09-12 14:40:12 +03:00
|
|
|
"admin": {
|
|
|
|
"redirects": true
|
|
|
|
},
|
Update Notification improvements (#9123)
closes #5071
- Remove hardcoded notification in admin controller
- NOTE: update check notifications are no longer blocking the admin rendering
- this is one of the most import changes
- we remove the hardcoded release message
- we also remove adding a notification manually in here, because this will work differently from now on
-> you receive a notification (release or custom) in the update check module and this module adds the notification as is to our database
- Change default core settings keys
- remove displayUpdateNotification
-> this was used to store the release version number send from the UCS
-> based on this value, Ghost creates a notification container with self defined values
-> not needed anymore
- rename seenNotifications to notifications
-> the new notifications key will hold both
1. the notification from the USC
2. the information about if a notification was seen or not
- this key hold only one release notification
- and n custom notifications
- Update Check Module: Request to the USC depends on the privacy configuration
- useUpdateCheck: true -> does a checkin in the USC (exposes data)
- useUpdateCheck: false -> does only a GET query to the USC (does not expose any data)
- make the request handling dynamic, so it depends on the flag
- add an extra logic to be able to define a custom USC endpoint (helpful for testing)
- add an extra logic to be able to force the request to the service (helpful for testing)
- Update check module: re-work condition when a check should happen
- only if the env is not correct
- remove deprecated config.updateCheck
- remove isPrivacyDisabled check (handled differently now, explained in last commit)
- Update check module: remove `showUpdateNotification` and readability
- showUpdateNotification was used in the admin controller to fetch the latest release version number from the db
- no need to check against semver in general, the USC takes care of that (no need to double check)
- improve readability of `nextUpdateCheck` condition
- Update check module: refactor `updateCheckResponse`
- remove db call to displayUpdateNotification, not used anymore
- support receiving multiple custom notifications
- support custom notification groups
- the default group is `all` - this will always be consumed
- groups can be extended via config e.g. `notificationGroups: ['migration']`
- Update check module: refactor createCustomNotification helper
- get rid of taking over notification duplication handling (this is not the task of the update check module)
- ensure we have good fallback values for non present attributes in a notification
- get rid of semver check (happens in the USC) - could be reconsidered later if LTS is gone
- Refactor notification API
- reason: get rid of in process notification store
-> this was an object hold in process
-> everything get's lost after restart
-> not helpful anymore, because imagine the following case
-> you get a notification
-> you store it in process
-> you mark this notification as seen
-> you restart Ghost, you will receive the same notification on the next check again
-> because we are no longer have a separate seen notifications object
- use database settings key `notification` instead
- refactor all api endpoints to support reading and storing into the `notifications` object
- most important: notification deletion happens via a `seen` property (the notification get's physically deleted 3 month automatically)
-> we have to remember a seen property, because otherwise you don't know which notification was already received/seen
- Add listener to remove seen notifications automatically after 3 month
- i just decided for 3 month (we can decrease?)
- at the end it doesn't really matter, as long as the windows is not tooooo short
- listen on updates for the notifications settings
- check if notification was seen and is older than 3 month
- ignore release notification
- Updated our privacy document
- Updated docs.ghost.org for privacy config behaviour
- contains a migration script to remove old settings keys
2018-01-09 17:20:00 +03:00
|
|
|
"updateCheck": {
|
|
|
|
"url": "https://updates.ghost.org",
|
|
|
|
"forceUpdate": false
|
|
|
|
},
|
2016-09-13 18:20:44 +03:00
|
|
|
"privacy": false,
|
2017-04-10 12:30:21 +03:00
|
|
|
"useMinFiles": true,
|
2016-09-13 18:20:44 +03:00
|
|
|
"paths": {
|
2016-09-13 23:24:57 +03:00
|
|
|
"contentPath": "content/"
|
2016-09-13 18:20:44 +03:00
|
|
|
},
|
2020-04-05 19:52:47 +03:00
|
|
|
"adapters": {
|
|
|
|
"sso": {
|
|
|
|
"active": "Default"
|
|
|
|
}
|
|
|
|
},
|
2016-09-13 18:20:44 +03:00
|
|
|
"storage": {
|
😱 🎨 Refactor storage adapter (#8229)
refs #7687
There are four main changes in this PR:
we have outsourced the base storage adapter to npm, because for storage developers it's annoying to inherit from a script within Ghost
we hacked theme storage handling into the default local storage adapter - this was reverted, instead we have added a static theme storage here
use classes instead of prototyping
optimise the storage adapter in general - everything is explained in each commit
----
* rename local-file-store to LocalFileStorage
I would like to keep the name pattern i have used for scheduling.
If a file is a class, the file name reflects the class name.
We can discuss this, if concerns are raised.
* Transform LocalFileStorage to class and inherit from new base
- inherit from npm ghost-storage-base
- rewrite to class
- no further refactoring, happens later
* Rename core/test/unit/storage/local-file-store_spec.js -> core/test/unit/storage/LocalFileStorage_spec.js
* Fix wrong require in core/test/unit/storage/LocalFileStorage_spec.js
* remove base storage and test
- see https://github.com/kirrg001/Ghost-Storage-Base
- the test has moved to this repo as well
* Use npm ghost-storage-base in storage/index.js
* remove the concept of getStorage('themes')
This concept was added when we added themes as a feature.
Back then, we have changed the local storage adapter to support images and themes.
This has added some hacks into the local storage adapters.
We want to revert this change and add a simple static theme storage.
Will adapt the api/themes layer in the next commits.
* Revert LocalFileStorage
- revert serve
- revert delete
* add storagePath as property to LocalFileStorage
- define one property which holds the storage path
- could be considered to pass from outside, but found that not helpful, as other storage adapters do not need this property
- IMPORTANT: save has no longer a targetDir option, because this was used to pass the alternative theme storage path
- IMPORTANT: exists has now an alternative targetDir, this makes sense, because
- you can either ask the storage exists('my-file') and it will look in the base storage path
- or you pass a specific path where to look exists('my-file', /path/to/dir)
* LocalFileStorage: get rid of store pattern
- getUniqueFileName(THIS)
- this doesn't make sense, instances always have access to this by default
* Add static theme storage
- inherits from the local file storage, because they both operate on the file system
- IMPORTANT: added a TODO to consider a merge of themes/loader and themes/storage
- but will be definitely not part of this PR
* Use new static theme storage in api/themes
- storage functions are simplified!
* Add https://github.com/kirrg001/Ghost-Storage-Base as dependency
- tarball for now, as i am still testing
- will release if PR review get's accepted
* Adapt tests and jscs/jshint
* 🐛 fix storage.read in favicon utility
- wrong implementation of error handling
* 🎨 optimise error messages for custom storage adapter errors
* little renaming in the storage utlity
- purpose is to have access to the custom storage instance and to the custom storage class
- see next commit why
* optimise instanceof base storage
- instanceof is always tricky in javascript
- if multiple modules exist, it can happen that instanceof is false
* fix getTargetDir
- the importer uses the `targetDir` option to ensure that images land in the correct folder
* ghost-storage-base@0.0.1 package.json dependency
2017-04-05 17:10:34 +03:00
|
|
|
"active": "LocalFileStorage"
|
2016-09-13 18:20:44 +03:00
|
|
|
},
|
|
|
|
"scheduling": {
|
|
|
|
"active": "SchedulingDefault"
|
2016-09-30 14:45:59 +03:00
|
|
|
},
|
2019-02-07 12:41:39 +03:00
|
|
|
"members": {
|
2019-02-23 06:47:42 +03:00
|
|
|
"contentApiAccess": [],
|
2019-02-07 12:41:39 +03:00
|
|
|
"paymentProcessors": []
|
|
|
|
},
|
2016-10-04 18:33:43 +03:00
|
|
|
"logging": {
|
|
|
|
"level": "info",
|
2016-10-25 14:17:43 +03:00
|
|
|
"rotation": {
|
2017-09-05 18:25:20 +03:00
|
|
|
"enabled": false,
|
|
|
|
"period": "1d",
|
|
|
|
"count": 10
|
2016-10-25 14:17:43 +03:00
|
|
|
},
|
2019-06-07 16:54:55 +03:00
|
|
|
"transports": ["stdout"],
|
|
|
|
"slowHelper": {
|
|
|
|
"level": "warn",
|
|
|
|
"threshold": 200
|
|
|
|
}
|
2016-11-08 14:33:19 +03:00
|
|
|
},
|
|
|
|
"spam": {
|
|
|
|
"user_login": {
|
|
|
|
"minWait": 600000,
|
|
|
|
"maxWait": 604800000,
|
|
|
|
"freeRetries": 4
|
|
|
|
},
|
|
|
|
"user_reset": {
|
|
|
|
"minWait": 3600000,
|
|
|
|
"maxWait": 3600000,
|
|
|
|
"lifetime": 3600,
|
|
|
|
"freeRetries": 4
|
|
|
|
},
|
|
|
|
"global_reset": {
|
|
|
|
"minWait": 3600000,
|
|
|
|
"maxWait": 3600000,
|
|
|
|
"lifetime": 3600,
|
|
|
|
"freeRetries":4
|
|
|
|
},
|
|
|
|
"global_block": {
|
|
|
|
"minWait": 3600000,
|
|
|
|
"maxWait": 3600000,
|
|
|
|
"lifetime": 3600,
|
|
|
|
"freeRetries":99
|
|
|
|
},
|
|
|
|
"private_block": {
|
|
|
|
"minWait": 3600000,
|
|
|
|
"maxWait": 3600000,
|
|
|
|
"lifetime": 3600,
|
|
|
|
"freeRetries":99
|
2019-01-07 16:03:46 +03:00
|
|
|
},
|
|
|
|
"content_api_key": {
|
|
|
|
"minWait": 3600000,
|
|
|
|
"maxWait": 86400000,
|
|
|
|
"lifetime": 3600,
|
|
|
|
"freeRetries": 99
|
2016-11-08 14:33:19 +03:00
|
|
|
}
|
2017-05-29 23:10:32 +03:00
|
|
|
},
|
|
|
|
"caching": {
|
|
|
|
"frontend": {
|
|
|
|
"maxAge": 0
|
|
|
|
},
|
|
|
|
"301": {
|
|
|
|
"maxAge": 31536000
|
|
|
|
},
|
|
|
|
"customRedirects": {
|
|
|
|
"maxAge": 31536000
|
|
|
|
},
|
|
|
|
"favicon": {
|
|
|
|
"maxAge": 86400
|
|
|
|
},
|
|
|
|
"sitemap": {
|
|
|
|
"maxAge": 3600
|
|
|
|
},
|
|
|
|
"robotstxt": {
|
|
|
|
"maxAge": 3600000
|
|
|
|
}
|
2018-08-30 19:30:36 +03:00
|
|
|
},
|
|
|
|
"imageOptimization": {
|
2020-06-15 18:45:36 +03:00
|
|
|
"resize": true,
|
|
|
|
"srcsets": true
|
2018-09-12 19:27:01 +03:00
|
|
|
},
|
|
|
|
"compress": true,
|
2018-12-17 17:02:47 +03:00
|
|
|
"preloadHeaders": false,
|
2019-05-28 11:04:48 +03:00
|
|
|
"adminFrameProtection": true,
|
2020-05-20 17:14:28 +03:00
|
|
|
"sendWelcomeEmail": true,
|
2020-06-18 20:05:23 +03:00
|
|
|
"stripeDirect": false
|
2016-09-13 18:20:44 +03:00
|
|
|
}
|