Skip to content

Fallback for DEFAULT_SCHEME should be depend on APP_ENABLE_HTTPS #42

@hwde

Description

@hwde

Recently I had a very rare redirect error with a new setup:

  • APP_ENABLE_HTTPS was set to true,
  • APP_DEFAULT_SCHEME was undefined.

When opening the domain in browser, i.e. https://example.com the page was redirected to http://example.com and the again to https://example.com ... and so on. I could fix this with setting APP_DEFAULT_SCHEME to https. This was the first time I saw this kind of error, webserver is nginx/php-fpm (7.3)

In gyro/core/constants.inc.php line #49 is:

Config::set_value_from_constant(Config::DEFAULT_SCHEME, 'APP_DEFAULT_SCHEME', 'http');

Maybe the fallback of "http" should be set to https if ENABLE_HTTPS/APP_ENABLE_HTTPS is true?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions