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

The option to enable absolute_form when proxying HTTPS request. #2509

Open
dallen66 opened this issue Apr 21, 2021 · 2 comments
Open

The option to enable absolute_form when proxying HTTPS request. #2509

dallen66 opened this issue Apr 21, 2021 · 2 comments

Comments

@dallen66
Copy link

Yes I know it is for security reason. But I am write a sandbox where request will proxy though Unix socket, then the request will be encrypted outside the sandbox.

I can create a pull request to enable the ability.

The API can be something like this

pub fn force_absolute_form(mut self) -> Connected {
        self.force_absolute_form = true;
        self
}
@dallen66 dallen66 changed the title The option to enable absolute_form when proxying https request. The option to enable absolute_form when proxying HTTPS request. Apr 21, 2021
@seanmonstar
Copy link
Member

You should be able to create a connector that sets proxy, and that will tell hyper to write the request in absolute form.

@dallen66
Copy link
Author

dallen66 commented Apr 22, 2021

For regular http:// url it will process it in absolute form but for https:// it default to origin form. I need a way to override it to absolute form.

fn test_absolute_form() {

if uri.scheme() == Some(&Scheme::HTTPS) {

Thank for your help.

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