Skip to content
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

Provide an example of injecting chrome from another domain #191

Open
bdone opened this issue Apr 21, 2021 · 1 comment
Open

Provide an example of injecting chrome from another domain #191

bdone opened this issue Apr 21, 2021 · 1 comment

Comments

@bdone
Copy link

bdone commented Apr 21, 2021

We'd like to rewrite chroming, but instead of using chrome service, use another domain by implementing Path rewriting. Can you please help provide a working example?

@mwcz
Copy link
Contributor

mwcz commented Apr 22, 2021

Thanks @bdone. I think the reason this doesn't work is that spandx is failing to pass chroming requests through the route mappings, which results in an infinite loop. For example:

host: "spandx.local" // spandx host
route: {
  "/services/chrome": {
    host: "http://chrome.local" // host to proxy /services/chrome request unto
  }
}

If I then did curl spandx.local/services/chrome/head/ it should reverse proxy that request to http://chrome.local/services/chrome/head/ but it doesn't. Instead, it reverse proxies the request right back to itself, spandx.local/services/chrome/head/, hence the infinite loop.

This will definitely require a spandx code change to fix, but I'll see about putting together a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants