Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to exclude some routes? #25

Closed
perffy opened this issue Mar 12, 2021 · 8 comments
Closed

How to exclude some routes? #25

perffy opened this issue Mar 12, 2021 · 8 comments

Comments

@perffy
Copy link

perffy commented Mar 12, 2021

Hi,

the package is the best for this purpose, unfortunately, I don't see if there is an option to exclude some routes to be excluded.
Unfortunately, it doesn't work with Laravel 8 and Livewire on my admin routes.

I see that you are planing in the future to add this option, but can you tell me some trick on how to bypass it?

Thanks

@cp-vrkansagara
Copy link
Contributor

Hey Perffy, I am glade that you are using this package.

As of now you can make a copy of AfterMiddleware.php and use is as your own code till the next release do the fixes.

@perffy
Copy link
Author

perffy commented Mar 12, 2021

so i place the AfterMiddleware.php in my Middleware folder and add it to all routes where I want the code to be compressed?

@vrkansagara
Copy link
Owner

@perffy This not as easy, Let me do work on this week and let you know for next release

@najathi
Copy link

najathi commented Mar 14, 2021

I'm also facing the same problem

@vrkansagara
Copy link
Owner

https://github.com/vrkansagara/LaraOutPress/tree/dev-master is ready to fixing reported issue. any one wanted to test this code

@najathi
Copy link

najathi commented Mar 21, 2021

// Is this library is enable or not.
'enabled' => env('VRKANSAGARA_COMPRESS_ENABLED', false),

// Do we are debug the data
'debug' => env('VRKANSAGARA_COMPRESS_DEBUG', false),

// In which environment compression work.
'target_environment' => env('VRKANSAGARA_COMPRESS_ENVIRONMENT', ''),

// Exclude routes from the compression
'exclude_routes' => [
'api/*',
]

@vrkansagara
Copy link
Owner

@najathi Is there anything missing or not working ?

@vrkansagara
Copy link
Owner

Closing this issue against release of https://github.com/vrkansagara/LaraOutPress/tree/2.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants