question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compression not working for static Assets

See original GitHub issue

Compression not working for Static assets.

screenshot 2019-02-22 at 13 32 55

Is there a way to enable Fastify Compress to work with Fastify-Static?

Current code:

`fastify.register(require(“fastify-compress”));

fastify.register(require(“fastify-static”), { root: path.join(__dirname, “assets”), prefix: “/assets” // optional: default ‘/’ });`

Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mcollinacommented, Aug 13, 2019

nextjs bypass fastify completely and render straight to the http response object. It cannot work with nextjs.

Il giorno mar 13 ago 2019 alle 13:25 Jibin Thomas notifications@github.com ha scritto:

fastify compress was not working when using nextjs

I tried fastify.register(require(“fastify-compress”))

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/fastify/fastify-compress/issues/46?email_source=notifications&email_token=AAAMXY7KZKMLTW3GRG2LYJTQEKK3HA5CNFSM4GZGPZW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FLPPY#issuecomment-520796095, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAMXYZGNWANDFML4VIUEMTQEKK3HANCNFSM4GZGPZWQ .

1reaction
mcollinacommented, Feb 22, 2019

@musdy that will be fixed in the next 1.x release (next week).

Read more comments on GitHub >

github_iconTop Results From Across the Web

IIS static content compression not working - Stack Overflow
1 Answer 1 · 1.Install failed request tracing in add role and feature->Web Server->health and diagnostics->tracing · 2.Open IIS manager->go to ...
Read more >
Why is IIS7 not compressing my static files? - Server Fault
In IIS7, click on the site that you are working with. ... Click into it and make sure that you have compression enabled...
Read more >
Improve Your Web App Performance By Serving Static Files in ...
Manually Compress Static Files to GZIP​​ After that, you should set up the hosting server to make sure that it will return http...
Read more >
Static resource stops working on compression
If I extract and compress again the page fails to load: load application tab, see that it works -> Download file from static...
Read more >
Static and dynamic content compression - Progress Software
You can compress responses to requests for static content. This way, when a client requests static content, such as .htm or .txt ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found