Skip to content

Commit

Permalink
removes content type validation
Browse files Browse the repository at this point in the history
  • Loading branch information
walt-1 committed Feb 22, 2024
1 parent b0a9914 commit 4e1854a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ export default {
});
}

const reqContentType = request.headers.get('content-type');
if (reqContentType !== 'application/json') {
return new Response('Invalid content-type, this application only supports application/json', {
status: 415,
});
}

const timestamp = new Date();
// calculates if origin is prod - splites all other traffic to dev rpc
const RPC_POOL = env.RPC_URL.split(',');
Expand All @@ -83,6 +76,16 @@ export default {
},
};

// const reqContentType = request.headers.get('content-type');
// if (reqContentType !== 'application/json') {
// return new Response(
// 'Invalid content-type, this application only supports application/json',
// {
// status: 415,
// }
// );
// }

// curSegment targets given rpc url index
return await fetchWithRetries(RPC_POOL, options, curSegment - 1, timestamp, logClient).then(
res => {
Expand Down

0 comments on commit 4e1854a

Please sign in to comment.