-
Notifications
You must be signed in to change notification settings - Fork 6
Proxy strains does not work on URL path #64
Comments
See https://github.com/adobe/developer.adobe.com/pull/137 for related PR for devsite |
Hi @hirenoble - that's definitely a bug. Thanks for reporting. |
I had another look at it, and it's a missing feature, not a bug. Something we want to have nonetheless, but it will take a bit of work. |
As a quick workaround, you might want to align the two paths, so either have |
…uration parameters required for adobe/helix-publish#64
@trieloff, Thank you for looking into this. I tried your suggested approach to change the github page URL to /support. Now I'm seeing another issue. https://developer.adobe.com/support is simply redirecting to https://adobedocs.github.io/support whereas what I want is to browser URL to remain https://developer.adobe.com/support and it should serve the content from github page. Here is an example of the expected behavior: https://anything.helix-demo.xyz/support VCL I used: so in helix proxy->Fastly rules we may want to set bereq.http.host and bereq.url |
Yep, in |
@trieloff It's because the GitHub pages behavior, so currently https://developer.adobe.com/support/ gives us the expected result whereas https://developer.adobe.com/support will get redirected. I think with your fix to have proxy on full path url this should get fixed as we will be mapping developer.adobe.com/support to adobedocs.github.io/support/ |
You might also want to try to add a redirect rule: redirects:
- from: ^/support$
to: /support/ the redirect rule should be executed before the request hits the GitHub backend, so you'll never see the faulty redirect from GitHub. |
Until now, proxy strains and runtime strains differed in the handling of strain URL paths. Runtime strain would effectively cut off the part of the URL that was used for strain resolution while proxy strains kept it. This change aligns the behavior and also allows specifying a backend root path in the origin of a proxy strain, allowing URL rewrites so that content requested from https://helixdomain.com/newpath could be served from https://backenddomain.com/oldpath. BREAKING CHANGE: changes root paths of all proxy strains - fixes #64
Fixed, but requires |
Still seeing the same issue w/ helix-cli 2.1.6. Relevant helix config part:
Run Get a 404 page, and
The expectation is that |
Closing this one, as adobe/helix-simulator#213 is the correct issue for the localhost scenario. |
# 1.0.0 (2019-06-24) ### Bug Fixes * **static:** process ESI for static resources, too ([8ea480d](8ea480d)) * .snyk & package.json to reduce vulnerabilities ([d68bf41](d68bf41)) * .snyk & package.json to reduce vulnerabilities ([c2314e5](c2314e5)) * **deploy:** use nodejs:10 container ([b64541e](b64541e)), closes [#55](#55) * **dictionaries:** set missing directory index ([ef56581](ef56581)), closes [#59](#59) * **linting:** linting again... ([b496576](b496576)) * **linting:** linting... ([275494f](275494f)) * **monitoring:** remove epsagon token from source code ([be35e31](be35e31)) * **package:** update @adobe/fastly-native-promises to version 1.10.0 ([258c5eb](258c5eb)) * **package:** update @adobe/fastly-native-promises to version 1.4.0 ([c29ed05](c29ed05)) * **package:** update @adobe/fastly-native-promises to version 1.6.0 ([dba6bd0](dba6bd0)), closes [#17](#17) * **package:** update @adobe/fastly-native-promises to version 1.6.1 ([8b755ae](8b755ae)) * **package:** update @adobe/fastly-native-promises to version 1.7.0 ([8955790](8955790)) * **package:** update @adobe/fastly-native-promises to version 1.8.0 ([23c37eb](23c37eb)) * **package:** update @adobe/fastly-native-promises to version 1.9.0 ([68c16f6](68c16f6)) * **package:** update @adobe/fastly-native-promises to version 1.9.1 ([de465f3](de465f3)) * **package:** update @adobe/helix-shared to version 0.10.3 ([7c9caef](7c9caef)) * **package:** update @adobe/helix-shared to version 0.10.4 ([d4b5e92](d4b5e92)) * **package:** update @adobe/helix-shared to version 0.10.5 ([fd67213](fd67213)) * **package:** update @adobe/helix-shared to version 0.11.0 ([d976bcb](d976bcb)) * **package:** update @adobe/helix-shared to version 0.6.2 ([20703f3](20703f3)) * **package:** update @adobe/helix-shared to version 0.7.0 ([d49ba13](d49ba13)) * **package:** update @adobe/helix-shared to version 0.8.0 ([4731732](4731732)) * **package:** update @adobe/helix-shared to version 0.8.1 ([024f137](024f137)) * **package:** update @adobe/helix-shared to version 0.8.3 ([6dd418b](6dd418b)) * **package:** update @adobe/helix-shared to version 0.8.4 ([feaf8eb](feaf8eb)) * **package:** update @adobe/helix-shared to version 1.0.1 ([ffad201](ffad201)), closes [#67](#67) * **package:** update @adobe/helix-shared to version 1.0.2 ([f3c27b6](f3c27b6)) * **package:** update @adobe/helix-shared to version 1.1.1 ([c1bf275](c1bf275)) * **package:** update @adobe/helix-shared to version 1.2.0 ([41faf50](41faf50)) * **package:** update @adobe/helix-shared to version 1.3.1 ([d002710](d002710)) * **package:** update @adobe/helix-shared to version 1.5.0 ([1a61355](1a61355)) * **package:** update fs-extra to version 8.0.1 ([cffa67c](cffa67c)) * **package:** update glob-to-regexp to version 0.4.1 ([5b0782f](5b0782f)) * **proxy:** Don't attempt to recover from 404 errors in proxy strains ([8b84690](8b84690)), closes [#75](#75) * **proxy:** prevent duplicate creation of backends for proxy strains ([c157e8b](c157e8b)) * **proxy:** use FastlyJSON when talking to Fastly API ([9d40b93](9d40b93)) * **static:** add missing slash to GitHub raw URL ([c07f401](c07f401)) * **static:** disable GZip for all backend requests that could contain ESI ([393ae0a](393ae0a)) * **static:** don't redeclare var ([3f23556](3f23556)) * **static:** drop accept-encoding to enforce esi ([2729f64](2729f64)) * **static:** enable compression for ESI-processed resources ([0eaf027](0eaf027)) * **static:** fix syntax error ([852969a](852969a)) * **static:** fix syntax error ([82949b0](82949b0)) * **static:** fix syntax error ([d22c465](d22c465)) * **static:** fix variable name ([cbb125e](cbb125e)) * **static:** fix VCL syntax error ([db4c524](db4c524)) * **static:** fix VCL syntax error ([76749d6](76749d6)) * **static:** handle immutable requests without restart ([79c0ba7](79c0ba7)) * **static:** move esi handling into fetch ([46bc081](46bc081)) * **static:** never use GZip when talking with Runtime, as there might be ESI ([21ce4a1](21ce4a1)) * **static:** no slash between ref and path in static retrieval ([209cd7f](209cd7f)) * **static:** protect against cache poisoning by verifying the etag ([1bc1e24](1bc1e24)) * **static:** remove brackets in URL ([4009ff5](4009ff5)) * **static:** restrict regex for immutable resources ([c71043f](c71043f)) * **static:** strip 302 from URL when requesting a redirect ([fd5a5db](fd5a5db)) * **static:** submit location headers for redirects, making actual redirects possible ([615bf33](615bf33)) * **static:** throw error for invalid resource paths ([92d4c82](92d4c82)) * **static:** turn on ESI processing when backend response requests it ([5459d30](5459d30)) * **static:** unset Accept-Encoding more aggressively ([df42f20](df42f20)) * **static:** use beresp instead of resp for ETag value ([112796d](112796d)) * **static:** use correct location header ([5d1f8c7](5d1f8c7)) * **static:** use correct path for entry for immutable resources ([c66f15f](c66f15f)) * **static:** use local var for new extension ([c995533](c995533)) * **static:** use re instead of req ([245b583](245b583)) * **static:** use req for tracing instead of resp ([806d48d](806d48d)) * **vcl:** bum version ([73d3f8e](73d3f8e)) * **vcl:** copyright & unrelated change ([e88ed93](e88ed93)) * **vcl:** include must be outside of a subroutine ([cef774f](cef774f)) * **vcl:** is line break required ? ([67080b2](67080b2)) * **vcl:** is linebreak required? ([9cc1ea2](9cc1ea2)) * **vcl:** remove unnecessary line breaks ([8502341](8502341)) * **vcl:** respect remapped url also in static ([f404c4d](f404c4d)), closes [#101](#101) ### Features * **monitoring:** add epsagon wrapper ([2d52627](2d52627)), closes [#104](#104) * **proxy:** make proxy strains respect the URL path and backend path ([ff77ba7](ff77ba7)) * **static:** enable asset statification for assets loaded from static URLs ([befc1e2](befc1e2)) * **static:** provide two new resource types for static resources: .esi to replace a static URL with a cacheable static URL and .hlx_[0-9a-f]+ for resources that are cached forever in the browser ([9f8e52c](9f8e52c)), closes [/github.com/adobe/helix-pipeline/issues/224#issuecomment-476690621](https://github.com//github.com/adobe/helix-pipeline/issues/224/issues/issuecomment-476690621) * **static:** rename static-esi to static-url, introduce static-302 which returns a redirect ([403ae1b](403ae1b)), closes [/github.com//pull/61#issuecomment-487664612](https://github.com//github.com/adobe/helix-publish/pull/61/issues/issuecomment-487664612) * **vcl:** Add extensions.vcl ([ae1b52c](ae1b52c)) * **vcl:** add more extension points ([979cfbe](979cfbe)) * **vcl:** Add more extension points ([3dee07e](3dee07e)) * **vcl:** Documentation ([902f6f3](902f6f3)) * **vcl:** Support Custom VCL ([b2ca735](b2ca735)) * **vcl:** testing extension logic ([717c192](717c192)) * **vcl:** Tests for synthetize method ([71bcd2d](71bcd2d)) ### Performance Improvements * **static:** declare static files to be immutable ([f0369b7](f0369b7)) ### BREAKING CHANGES * **proxy:** changes root paths of all proxy strains - fixes #64
🎉 This issue has been resolved in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Proxy strain works for host but not on the full URL path.
To Reproduce
origin: https://adobedocs.github.io/developer-support/
url: https://developer.adobe.com/support
Expected behavior
fetching origin from https://adobedocs.github.io/developer-support/
Screenshots
fetches https://adobedocs.github.io/support
Version:
1.0.0
Additional context
Current proxy strain creates rule for host but doesn't take path into consideration.
set req.http.host = "adobedocs.github.io";
it should be:
set req.http.host = "adobedocs.github.io";
set req.url = "/developer-support/";
The text was updated successfully, but these errors were encountered: