Skip to content

redirect() in component does not respect server port #164

@novotnej

Description

@novotnej

I am running Nette 2.4 in docker with nginx and PHP 7.0.12. Docker is internally listening on port 666, port 80 is exposed (works fine when both are 666)

Specific scenario: processing form inside a component that's created using a factory injected to a presenter.

$form->onSuccess[] = function(Form $form) {
    $this->presenter->redirect('Listing:default', ['filter' => $form->getValues(true)]);
};

This will try to re-direct to :666/listing?filter= ...
And while I could resolve this simply by using same ports (80:80), I am a bit afraid what it would do when using https and also once it's set up behind a load balancer or a proxy.

Also might be worth investigating whether sessions will be stored properly in regard to the domain the user actually accessed (rather than domain where the instance is physically running) - this might potentially be a big issue..

Thank you for checking this out!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions