This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//An ESI service provider that defines a custom @esi(/header) directive that can be used to render ESI tags | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Support\Facades\Blade; | |
class EsiServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import std; | |
sub vcl_recv { | |
if (!req.http.X-Forwarded-Proto) { | |
if(std.port(server.ip) == 443) { | |
set req.http.X-Forwarded-Proto = "https"; | |
} else { | |
set req.http.X-Forwarded-Proto = "http"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import std; | |
backend default { | |
.host = "localhost"; | |
.port = "8080"; | |
.first_byte_timeout = 600s; | |
.probe = { | |
.url = "/health_check.php"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.1; | |
import std; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
# Add hostnames, IP addresses and subnets that are allowed to purge content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.1; | |
backend default none; | |
sub vcl_recv { | |
return(synth(200,"OK")); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Varnish Cache Plus, a high-performance HTTP accelerator | |
After=network-online.target | |
[Service] | |
Type=forking | |
KillMode=process | |
# Maximum number of open files (for ulimit -n) | |
LimitNOFILE=131072 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
echo-server: | |
image: "jmalloc/echo-server:latest" | |
container_name: origin | |
hostname: origin | |
ports: | |
- "8080:8080" | |
varnish: | |
image: "varnish:latest" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EdgestashBundle; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Twig\Extension\AbstractExtension; | |
use Twig\TwigFilter; | |
use Twig\TwigFunction; | |
class TwigExtension extends AbstractExtension | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EdgestashBundle\EventSubscriber; | |
use Symfony\Component\EventDispatcher\Event; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\KernelEvents; | |
class EdgestashSubscriber implements EventSubscriberInterface | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.1; | |
import cookieplus; | |
import edgestash; | |
import std; | |
import ykey; | |
import redis; | |
import synthbackend; | |
backend default { | |
.host = "origin"; |
NewerOlder