Skip to content

Commit

Permalink
Use X-Competitive-Companion header instead of User-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
jmerle committed Nov 11, 2024
1 parent db8db31 commit fff20b3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/utils/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Runtime } from 'webextension-polyfill';
import { productName, version } from '../../package.json';
import { version } from '../../package.json';
import { Message, MessageAction } from '../models/messaging';
import { browser } from './browser';
import { sendToBackground } from './messaging';
Expand All @@ -12,11 +12,8 @@ export const requiredPermissions: Record<string, string> = {
'https://judge.beecrowd.com/': 'https://resources.beecrowd.com/*',
};

/*
* Default headers to be sent with every request
*/
const defaultHeaders = {
'User-Agent': `${productName}/${version}`,
'X-Competitive-Companion': version,
} as const;

/**
Expand Down

0 comments on commit fff20b3

Please sign in to comment.