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

Support for managing custom port #1290

Open
superkekko opened this issue Dec 18, 2024 · 4 comments
Open

Support for managing custom port #1290

superkekko opened this issue Dec 18, 2024 · 4 comments
Labels

Comments

@superkekko
Copy link

Hi,

I use the version 3.8 for a while without problems bu recently I needed to switch from standard port (443) to a custom port (9443) and now the reroute process "kills" me the port.

if (!$this->checklogged($f3)) { $f3->reroute('/logout'); };

What I am missing?

Thanks,
Francesco

@ikkez
Copy link
Collaborator

ikkez commented Dec 29, 2024

Hi.
Well, the port is determined by $_SERVER['SERVER_PORT'] or X-Forwarded-Port header. If your used port is not set because it gets lost in an reverse proxy or some other configuration, you can either manually overwrite $_SERVER['SERVER_PORT'] before running the framework or simply set the PORT hive variable with the used port. This is then going to be used when rerouting.

@ikkez ikkez added the question label Dec 29, 2024
@superkekko
Copy link
Author

Thanks,

It's helpfull. Yes, my configuration Is a bit tricky because of my ISP.

I need to access with the port 9443 from the outside, then the ISP router translate the 9443 to 443 then the ISP router comunicate to the server.

Since I'm not so expert in programming this part how I setup the PORT variable?

Thanks!

@ikkez
Copy link
Collaborator

ikkez commented Dec 29, 2024

A simple... $f3->set('PORT', 9443) should do it. add it somewhere before running $f3->run(); or put it in your config.ini

You're welcome ;)

@superkekko
Copy link
Author

Awesome 😎

Thanks you so much! I'll try as soon a get home!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants