Ensured that endpoint header config is not modified in future
refs https://linear.app/tryghost/issue/ENG-674/ This will cause errors to be thrown if developers attempt to modify the shared header config in future.
This commit is contained in:
parent
ec697051dc
commit
93263fa7be
@ -188,6 +188,8 @@ const pipeline = (apiController, apiUtils, apiType) => {
|
||||
return keys.reduce((obj, method) => {
|
||||
const apiImpl = _.cloneDeep(apiController)[method];
|
||||
|
||||
Object.freeze(apiImpl.headers);
|
||||
|
||||
obj[method] = async function wrapper() {
|
||||
const apiConfig = {docName, method};
|
||||
let options;
|
||||
|
Loading…
Reference in New Issue
Block a user