Skip to content

Bacon should send sane caching headers #3

@igalic

Description

@igalic

Right now, bacon starts a PHP session at the, which causes it to send response headers such as these:

HTTP/1.1 200 OK
Host: localhost:8080
Connection: close
X-Powered-By: PHP/5.4.9-4ubuntu2
Set-Cookie: 5fff0c76cab5500d8ff289d2d37de289d3214d0f=ah0dds0f6003u7cgt3jel18qpjo6ic9a; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: 5fff0c76cab5500d8ff289d2d37de289d3214d0f=44nt3jt9dmp4obe4b7b1laefjhgml9mk; path=/
Content-type: text/html

While this is a good default for a highly dynamic site with heavy user-interaction, it's not a very good default for… everything else.

The reason for these headers is PHP's defaults for session_cache_limiter and session_cache_expire.
Perhaps we should make those configurable (on a per-route basis?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions