Skip to content

Fails if Confluence fronted by reverse proxy (http headers) #679

@AThomsen

Description

@AThomsen

What happened?

When Confluence is fronted by a reverse proxy (squid in this case), subsequent API calls fails.

The reason is in https://github.com/kovetskiy/gopencils/blob/0b776066936ac15fe239d3f8a097d760e69a2257/resource.go#L298C1-L301C1 where all http headers of an api response is copied to the resource. Subsequent calls add the response headers 1-1 as request headers :https://github.com/kovetskiy/gopencils/blob/0b776066936ac15fe239d3f8a097d760e69a2257/resource.go#L221

In my case, passing the via header from response to a request results in 403 forbidden.

What did you expect to happen?

Headers used for proxies etc. should not be added blindly as request headers. (Also, why add these headers at all?)

If nothing else, please filter out at least the via header :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions