mirror of
https://github.com/hanzonet/explore.git
synced 2026-11-02 12:03:14 +00:00
23 lines
417 B
TypeScript
23 lines
417 B
TypeScript
import type CspDev from 'csp-dev';
|
|
|
|
import config from 'configs/app';
|
|
|
|
const feature = config.features.marketplace;
|
|
|
|
export function marketplace(): CspDev.DirectiveDescriptor {
|
|
if (!feature.isEnabled) {
|
|
return {};
|
|
}
|
|
|
|
return {
|
|
'connect-src': [
|
|
'api' in feature ? feature.api.endpoint : '',
|
|
feature.rating ? 'https://api.airtable.com' : '',
|
|
],
|
|
|
|
'frame-src': [
|
|
'*',
|
|
],
|
|
};
|
|
}
|