-
Notifications
You must be signed in to change notification settings - Fork 66
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
As an advanced developer, I would like to extend some parts of the VCL logic #812
Comments
I think you will need the ability to insert before and after, as some subroutines use |
I started to look into since but I do not feel comfortable doing that. Before changing anything, I'd like to make sure I am taking the right approach. I would do it like this:
Looks relatively simple but I'd like the feedback from the "architects" @tripodsan and @trieloff. |
we could also alter the payload with:
i'm sure we need more later :-) |
I would make it more explicit via argument, like:
|
I agree with @tripodsan on both counts. |
Here is how to use custom VLC:
Your extension points are published to Fastly together with the rest of the VCL files. |
@koraa and myself worked both on a way to use the subdomain as the source for the content repo and owner. The use case is simple:
html.htl
andhtml.pre.js
) is handled by the domain owner (standard Helix project)To achieve that, it is pretty easy to setup an Helix project, deploy and publish. The handling of the / from the subdomain must be done on Fastly in VCL - basically requires a custom
helix.vcl
which gets overwritten each time byhlx publish
thus requires a manual task to patch it in Fastly after each publication. Here is an example of customisation: https://gist.github.com/kptdobe/bd0f5bb10b88783a3cefd917beb98a68The use case could be achieved in a very simple way if as an advanced developer I have a way to define a
custom.vcl
file in my Helix project that would be uploaded for me during the publish and that would allow me to extend / override certain pieces of the VCL. Like this, no need to manually patch thehelix.vcl
file.For this use case, the extension point could be: a
hlx_type_pipeline_ext
subrouting is called at the end of thehlx_type_pipeline
subroutine. By default it is empty, I would write one that contains the logic to overridereq.http.X-Owner
andreq.http.X-Repo
based on the use case requirements.Note 1: this requires advanced VCL knowledges thus it should be reserved to really advanced developers that knows what they are doing.
Note 2: this is the only known extension for now, I would not allow more until we have a concrete and clear use case.
The text was updated successfully, but these errors were encountered: