dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link

prepareResponse set weak etags #1499

Open moafak opened 6 years ago

moafak commented 6 years ago

How to instruct dingo to return weak etags?
https://github.com/dingo/api/blob/de0f74e6079138ce1a22280f3e3635c58d8d12bf/src/Routing/Router.php#L563

setEtag method accepts a boolean parameter to set etags as weak etags
https://github.com/symfony/http-foundation/blob/8961ef9554af1dfc77ce71e1a34e4953f790dc45/Response.php#L898

moafak commented 6 years ago

Middleware seems to be a solution to this https://github.com/matthewbdaly/laravel-etag-middleware