8000 feat(forward-headers): handle forwarding of generic headers and cookie by JonathanMontane · Pull Request #14 · algolia/renderscript · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(forward-headers): handle forwarding of generic headers and cookie #14

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

Merged
merged 3 commits into from
Oct 28, 2019

Conversation

JonathanMontane
Copy link
Contributor
@JonathanMontane JonathanMontane commented Oct 25, 2019

This PR introduces the ability to forward headers to the page navigation requests.

It adds an environment variable called HEADERS_TO_FORWARD which accepts a comma separated list of headers to forward.

There is also special handling of cookies, since browser do not consider Cookie as a regular request header.

How to test this PR

go on https://crawler.algolia.com, login, and get the Cookie header, then run yarn dev and

✗ curl -i -X POST 'http://localhost:3000/render' \
  -d 'url=https%3A%2F%2Fcrawler.algolia.com%2Fadmin%2Fuser_configs%2F${CONFIG_ID}%2Fteam' \
  -H 'Cookie: ${Cookie}'

@JonathanMontane JonathanMontane self-assigned this Oct 25, 2019
@JonathanMontane JonathanMontane added the enhancement New feature or request label Oct 25, 2019
Copy link
Member
@Jerska Jerska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@JonathanMontane JonathanMontane merged commit af45367 into master Oct 28, 2019
@JonathanMontane JonathanMontane deleted the feat/forward-headers branch October 28, 2019 09:15
algolia-crawler-bot pushed a commit that referenced this pull request Oct 28, 2019
# [1.3.0](v1.2.3...v1.3.0) (2019-10-28)

### Features

* **forward-headers:** handle forwarding of generic headers and cookie ([#14](#14)) ([af45367](af45367))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0