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
Some metadata URL not re-written #501
Comments
@kptdobe Would it be more appropriate to just fix all metadata entries by default? I'm anticipating that customers will potentially add a slew of .page and .live URLs in there (not just for experiments). For our experimentation plugin, we already would need to support:
And the plugin assumes that you can even rename those via config if authors prefer a different naming convention, so we'd still not fix URLs in that use case. Add to this the typical SEO links that I've seen customer using:
It seems to me that trying to allow-list every option is a bit of a moot point as we'll obviously always miss a few as the use cases grow. |
i think this is a broader conversation that expands into other aspects. this means that there are a range of values where we currently rely on client sided techniques to remove the hostname and effectively rewrite those on client... this includes link texts (eg. someone just pasting a URL), values in spreadsheets, values in metadata, values in block configs, etc.) at this juncture, i think it would be better if we rewrote these URLs, or made them relative, depending on the use case but especially the latter yields a lot of incompatibilities with existing javascript code (eg. i think the end goal should be that we don't serve any URL references as values leaking implementation details or pointing to different origins. i think there is set of standardized metadata where link semantics are implied (eg. canonical, feeds, hreflang) and could rewrite them without much danger of breaking things. applying a more general rewriting for metadata or other values, has proven problematic in practice on individual projects / customers, so i would definitely be very careful and apply a lot of testing for rewriting custom (project or app specific) metadata, and possibly treat this as an opt-in / feature flag via config bus some time in the future to avoid breaking existing projects. |
it could also be handled via the upcoming template feature, eg https://{{url.host}}/experiment |
While looking at source code of page https://www.bitdefender.com.au/solutions/, I discovered:
The
experiment-variants
exposes hlx.page urls in production. Based on @meryllblanchet's feedback, the code consuming this meta is aware of that and does not use the host to fetch the experiments. While this is working, it is not nice to expose internal urls in production.I suggest to add a list of known metadata for which the URLs would made absolute with production host (like https://github.com/adobe/helix-html-pipeline/blob/main/src/steps/extract-metadata.js#L254)
cc @ramboz
The text was updated successfully, but these errors were encountered: