mirror of
https://github.com/directus/directus.git
synced 2026-02-12 03:54:56 -05:00
One more
This commit is contained in:
@@ -310,6 +310,7 @@ export default async function getASTFromQuery(
|
||||
|
||||
if (fieldKey === '*') {
|
||||
const aliases = Object.keys(query.alias ?? {});
|
||||
|
||||
// Set to all fields in collection
|
||||
if (allowedFields.includes('*')) {
|
||||
fields.splice(index, 1, ...fieldsInCollection, ...aliases);
|
||||
|
||||
@@ -13,8 +13,10 @@ export function shouldSkipCache(req: Request): boolean {
|
||||
|
||||
// Always skip cache for requests coming from the data studio based on Referer header
|
||||
const referer = req.get('Referer');
|
||||
|
||||
if (referer) {
|
||||
const adminUrl = new Url(env['PUBLIC_URL']).addPath('admin');
|
||||
|
||||
if (adminUrl.isRootRelative()) {
|
||||
const refererUrl = new Url(referer);
|
||||
if (refererUrl.path.join('/').startsWith(adminUrl.path.join('/'))) return true;
|
||||
|
||||
@@ -72,6 +72,7 @@ export function validateSnapshot(snapshot: Snapshot, force = false) {
|
||||
}
|
||||
|
||||
const currentVendor = getDatabaseClient();
|
||||
|
||||
if (snapshot.vendor !== currentVendor) {
|
||||
throw new InvalidPayloadException(
|
||||
`Provided snapshot's vendor ${snapshot.vendor} does not match the current instance's vendor ${currentVendor}. You can bypass this check by passing the "force" query parameter.`
|
||||
|
||||
Reference in New Issue
Block a user