Skip to content

[Bug] set HTTP redirect correctly when behind a reverse proxy  #1370

Closed
@jeromeleonard

Description

@jeromeleonard

Request Type

Bug

Problem Description

When behind a reverse proxy like nginx, and redirection is set to a virtual directory, TH does not reply the good redirection (replies a HTTP 308).

Steps to Reproduce

set Nginx to redirect to a virtual directory:

      location /thehive {
                proxy_pass              http://127.0.0.1:9000/thehive;
                proxy_http_version      1.1;
                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto $scheme;
        }

Configure TheHive accordingly:

play.http.context="/thehive"

Complementary information

Screenshots of local PCAP on port 9000 (and 9001 for cortex as a comparison)

thehive
cortex

Metadata

Metadata

Assignees

Labels

TheHive4TheHive4 related issuesbug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions