Skip to content

cleanup hash lookup request #168

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

Merged
merged 1 commit into from
Feb 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/user-context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Caching on user context works as follows:
2. The :term:`caching proxy` receives the request. It sends a request
(the *hash request*) with a special accept header
(``application/vnd.fos.user-context-hash``) to a specific URL,
e.g., ``/user_context_hash.php``.
e.g., ``/_fos_user_context_hash``.
3. The :term:`application` receives the hash request. The application knows the
client’s user context (roles, permissions, etc.) and generates a hash based
on that information. The application then returns a response containing that
Expand Down Expand Up @@ -96,7 +96,9 @@ Returning the User Context Hash
-------------------------------

It is up to you to return the user context hash in response to the hash request
(``/user_context_hash.php`` in step 3 above)::
(``/_fos_user_context_hash`` in step 3 above)::

// <web-root>/_fos_user_context_hash/index.php

$hash = $hashGenerator->generateHash();

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/varnish-3/user_context.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sub vcl_recv {

# Backup original URL
set req.http.X-Fos-Original-Url = req.url;
set req.url = "/user_context_hash.php";
set req.url = "/_fos_user_context_hash";

# For functional tests
call user_context_hash_url;
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/varnish-4/user_context.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sub vcl_recv {

# Backup original URL
set req.http.X-Fos-Original-Url = req.url;
set req.url = "/user_context_hash.php";
set req.url = "/_fos_user_context_hash";

# For functional tests
call user_context_hash_url;
Expand Down