Skip to content

Commit

Permalink
Merge pull request #11 from tlsnotary/compression
Browse files Browse the repository at this point in the history
Add compression to web config
  • Loading branch information
Codetrauma authored Nov 11, 2024
2 parents 4ee279e + cd9a9ea commit f013e16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ app.post('/verify-attestation', async (req, res) => {
try {
const notaryUrl = convertNotaryWsToHttp(attestation.meta.notaryUrl);
const notaryPem = await fetchPublicKeyFromNotary(notaryUrl);
console.log('SERVER NOTARY PEM', notaryPem);
const presentation = await verify(attestation.data, notaryPem);

const presentationObj = {
Expand Down
1 change: 0 additions & 1 deletion server/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export async function fetchPublicKeyFromNotary(notaryUrl: string) {
try {
const url = new URL(notaryUrl);
const { hostname } = url;
console.log('HOSTNAME', hostname);
if (hostname === '127.0.0.1' || hostname === 'localhost') return localPem;
const res = await fetch(notaryUrl + '/info');
const json: any = await res.json();
Expand Down
6 changes: 6 additions & 0 deletions webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ var options = {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new CompressionPlugin({
algorithm: 'gzip',
test: /\.(js|css|html|svg)$/,
threshold: 10240,
deleteOriginalAssets: false,
}),
].filter(Boolean),
infrastructureLogging: {
level: 'info',
Expand Down

0 comments on commit f013e16

Please sign in to comment.