Merge branch 'master' into master

This commit is contained in:
Daan van Ham 2020-08-07 16:16:09 +02:00 committed by GitHub
commit 0f34541231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ module.exports = {
//...
settings: {
cors: {
origin: 'http://localhost',
origin: ['http://localhost', 'https://mysite.com', 'https://www.mysite.com']
},
},
};
@ -207,7 +207,7 @@ The session doesn't work with `mongo` as a client. The package that we should us
- `enabled` (boolean): Enable or disable XSS to prevent Cross Site Scripting (XSS) attacks in older IE browsers (IE8).
- [`cors`](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)
- `enabled` (boolean): Enable or disable CORS to prevent your server to be requested from another domain.
- `origin` (string): Allowed URLs (`http://example1.com, http://example2.com` or allows everyone `*`). Default value: `*`.
- `origin` (string or array): Allowed URLs (`http://example1.com, http://example2.com`, `['http://www.example1.com', 'http://example1.com']` or allows everyone `*`). Default value: `*`.
- `expose` (array): Configures the `Access-Control-Expose-Headers` CORS header. If not specified, no custom headers are exposed. Default value: `["WWW-Authenticate", "Server-Authorization"]`.
- `maxAge` (integer): Configures the `Access-Control-Max-Age` CORS header. Default value: `31536000`.
- `credentials` (boolean): Configures the `Access-Control-Allow-Credentials` CORS header. Default value: `true`.

View File

@ -44,7 +44,7 @@ const emailTemplate = {
Your account is now linked with: <%= user.email %>.`,
html: `<h1>Welcome on mywebsite.fr!</h1>
<p>Your account is now linked with: <%= user.email %>.<p>`,
},
};
await strapi.plugins.email.services.email.sendTemplatedEmail(
{

View File

@ -212,7 +212,7 @@ const createAggregationFieldsResolver = function(model, fields, operation, typeC
* Correctly format the data returned by the group by
*/
const preProcessGroupByData = function({ result, fieldKey, filters }) {
const _result = _.toArray(result);
const _result = _.toArray(result).filter(value => Boolean(value._id));
return _.map(_result, value => {
return {
key: value._id.toString(),