Comments (9)
Caching is disabled on Varnish for authenticated users in Drupal preset. You probably have an issue somewhere else.
from varnish.
Wouldn't the pass for authenticated users occur too late though? If I move the preset include above the static include and/or remove VARNISH_CACHE_STATIC_FILES, the page is delivered as expected.
from varnish.
Please describe how to reproduce this issue, it works fine for me with Drupal 8 and enabled/disabled VARNISH_CACHE_STATIC_FILES
from varnish.
Recreated with vanilla docker4drupal with VARNISH_CACHE_STATIC_FILES
enabled for both Drupal 7 and Drupal 8.
Steps to recreate:
- Install Drupal
- Configure private file system and add a field to a content type that uses the private file system (Article has one if using standard install)
- Create an unpublished node
Expected result:
- Anonymous users should get a 403 and users with appropriate permissions should see the file
- Both anonymous and authenticated users receive a 403
from varnish.
Thank you. I was able to reproduce the issue (I thought you always get 403 when access isn't restricted). Indeed the original issue with the ordering of cookies strip remained, it's probably was reversed because the way it was fixed wasn't right and broke other things. The fix has been applied, please check the latest version.
from varnish.
Perfect, pulled the latest and my original issue is resolved. Thank you for the fix!
from varnish.
It looks like this change has disabled the caching ALL static files for authenticated users if a preset is being used.
While it is good that Drupal private files (/system/files/*) should not be cached for authenticated users, there are lots of other files that should still be cached. e.g. public files, css, js, images included in theme or module folders etc.
How about putting includes/static.vcl back above the presets, but checking for VARNISH_DRUPAL_EXCLUDE_URLS inside static.vcl?
from varnish.
@drasgardian do you have VARNISH_CACHE_STATIC_FILES
enabled in your environment? It's required because static files not cached by default.
from varnish.
@PavelPrischepa (working with @drasgardian) yes we do have VARNISH_CACHE_STATIC_FILES enabled. The order of operations in the default VCL means that this has no effect for authenticated users.
from varnish.
Related Issues (20)
- Compile varnish from sources HOT 1
- Support of WooCommerce cart cookies HOT 2
- Possible config issues HOT 2
- Problem with purge key HOT 11
- Idea: cache POST request with specific header HOT 2
- VARNISH_KEEP_ALL_COOKIES does not work HOT 7
- Make VCKEY cookies available on backend HOT 1
- Varnish modules not imported [SOLVED] HOT 1
- WordPress caching not working
- An Instruction HOT 1
- Add mod dynamic
- Drupal preset - cache public static files for authenticated users. HOT 1
- Drupal Preset SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE not appended HOT 1
- Arm images missing HOT 5
- Varnish is not compiling - container exit code 2 HOT 3
- varnish cache tag invalidation not working with drupal 8. HOT 2
- Drupal responsive image styles not generated when requested by anonymous users HOT 1
- Upgrade alpine to 3.17
- Add mod digest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from varnish.