Skip to content

Commit

Permalink
chore(deps): revert axios to 1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JiPaix committed Dec 31, 2022
1 parent ec8dcb0 commit c3c7165
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@mdi/font": "^7.1.96",
"@mdi/js": "^7.1.96",
"@quasar/extras": "^1.15.9",
"axios": "^1.2.2",
"axios": "^1.1.3",
"cheerio": "^1.0.0-rc.12",
"compression": "^1.7.4",
"connect-history-api-fallback": "^2.0.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/api/src/models/abstracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,7 @@ export default class Mirror<T extends Record<string, unknown> = Record<string, u

async #internalFetch<T>(config: ClusterJob, type: 'html'|'json'|'string') {
// prepare the config for both Axios and Puppeteer
config.headers = {
...config.headers,
};
config.headers = config.headers || {};

if(type !== 'json') config.headers.referer = config.referer || this.host.replace(/http(s?):\/\//g, '');
if(config.cookies) config.headers['Cookie'] = config.cookies.map(c => c.name+'='+c.value+';').join(' ') + ' path=/; domain='+this.host.replace(/http(s?):\/\//g, '');
Expand Down

0 comments on commit c3c7165

Please sign in to comment.