Questions tagged [fastly]

Fastly is a content delivery network and edge cloud platform used by the latest generation of web services.

The Fastly platform allows you to build and deploy services globally in VCL on top of the Varnish cache server or in WASI-compatible languages such as Rust or AssemblyScript on the Compute@Edge platform.

76 questions
0
votes
1 answer

extract string from req.url.path in VCL Fastly

I need help to extract values from string req.url.path which looks like this: /a/b/c/d Need to extract c, if there is url, like /a, it should return ''. I tried regsub(req.url.path, "/a/b/", "\5"); Tried with replace too. but it is not effectively…
pl2ern4
  • 340
  • 2
  • 10
0
votes
1 answer

Push http2 all CSS asset files using Varnish regex

I'm using Varnish (fastly) and http2 to push css and js files. I want to push all css, js, png files. My current configuration pushes only specified files from a given path: if (fastly_info.is_h2 && req.url ~ "pl_PL") { …
Łukasz D. Tulikowski
  • 1,440
  • 1
  • 17
  • 36
0
votes
1 answer

Alternative to 'ban' for Varnish 2.x

We are using below code in Varnish 4.x: if (req.http.X-Pool) { ban("obj.http.X-Pool ~ " + req.http.X-Pool); } Now we are moving to Fastly which uses Varnish 2.x, so we are not getting what is the alternative to ban in Varnish 2.x
0
votes
0 answers

Emoji's are not rendering by a chrome extension?

A few months back I wrote an extension to scan a webpage and extracts a few details from it. The webpage is an application form and users of the extension can select complete or incomplete after examining the details given by the applicant. Once the…
Sankha Karunasekara
  • 1,636
  • 18
  • 19
0
votes
1 answer

Why is Artifactory downloading massive amounts from Fastly?

We have Artifactory deployed locally. Our network team reports that Artifactory has begun downloading large amounts of data from Fastly, to the extent that it is having a major impact on our network. They report, a ton of data is pulled from…
0
votes
1 answer

recreating cURL request with -I, -H flags in nodeJS

On the command line, I can do a request like: curl -I -H "Fastly-Debug: 1" and it will return a lot of helpful information from the CDN serving that URL, in this case, Fastly: cache-control: public, max-age=0, must-revalidate last-modified: Tue,…
maddie
  • 1,854
  • 4
  • 30
  • 66
0
votes
1 answer

Fastly/Varnish response headers based on data center and cache status

I am trying to create a Varnish response header which would help me debug the state of the caches. I would like to create a header which would display the datacenters the request went through and age of the object. Something like: X-Fastly-Age:…
Vojtěch
  • 11,312
  • 31
  • 103
  • 173
0
votes
1 answer

How does qz.com display cached content while being signed in? (No Javascript)

So I've been exploring the infrastructure of many websites again recently and started examining http response headers very closely. After doing this for so long, I felt it was was very clear that if you were logged into a website, it could not…
nikolay
  • 49
  • 6
0
votes
1 answer

How to force Fastly CDN to redirect requests to a seperate domain if the user receives 50* errors?

We want to force users to view our Status Page hosted on a subdomain when our Fastly CDN receives a 50* error from the back end origin? Can someone provide any assistance, we have read these two articles but it's above our…
0
votes
2 answers

VCL Snippet for changing request.url

I am trying to implement a VCL snippet (for Fastly Varnish implementation), that would replace URL before proxying the request to a service. Eg.: //domain.com/services/user/hello-world -> //userservice/hello-world To do this, I have written this: …
Vojtěch
  • 11,312
  • 31
  • 103
  • 173
0
votes
1 answer

Fastly CDN Heroku URL redirecting

I recently added Fastly domain from addons in Heroku application. And when Fastly was provisioned I got a test URL which is as follows: https://felix-homes-herokuapp-com.global.ssl.fastly.net/ Whenever I click on this url it gets redirected…
Jaskaran Singh
  • 531
  • 3
  • 14
0
votes
1 answer

Cannot call Google Cloud Function behind Firebase Hosting - Status 503 but no indication on status pages

I have a problem accessing a Google Cloud HTTP Function that is exposed through Firebase Hosting. I assume there is an issue with the CDN, because the function has not changed, but I do not see anything on the status…
Kariem
  • 4,398
  • 3
  • 44
  • 73
0
votes
2 answers

How to add redirect exceptions using Varnish?

I am trying to redirect a path e.g. www.something.com/apple/pie to www.something.com/tickets/pie-details but also have some exceptions e.g. www.something.com/apple/helloworld does not get redirected to…
Raymond Ly
  • 42
  • 4
0
votes
1 answer

How to copy part of a URL to a redirect path

I am trying to redirect a path e.g. www.something.com/apple/pie to www.something.com/tickets/pie-details This is what I have tried but doesn't work: if (req.url ~ "^/apple/.*") { set req.url = "^/tickets/.*-details"; error 701 req.url; } Am…
Raymond Ly
  • 42
  • 4
0
votes
1 answer

CDN Farfuture URLs not be working with Fastly, if enabled cacheable forever checkbox

Many thanks for your reply to my query, I want to ask you one more points on #1. Below is details for my query/issue: On point #1, we can see this is "x-cache: MISS" in the response headers; we get the same behavior when requesting a given URL for…