Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

passing authorization headers

Featured Replies

I have some sites that make use of HTTP authorization headers inside of PHP (so not using htaccess/htpasswd, but an internal user database). For the moment I have simply added the required "-pass-header Authorization" to scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php @ 63 right after the "-socket" setting. But it would be nice if this was either always on by default or selectable as a switch in the GUI (could either be a global FCGI/FPM setting, but would be nicer if it was on a level with "PHP Configurations", since it's rarely needed).

Thanks

Günther

solution for one specific setup...what about mod_proxy users?

  • Author

hi d00p... what about mod_proxy users? (I got no clue really ;-) )

Anyway, passing authentication headers is nothing "bad" or "wrong" either. If you find it to intrusive to add a switch for it, why not allowing it by default? As far as I can tell there are neither performance issues with it, nor security issues - in the end it is up to the developer who uses it.

  • Author

well sure!

Dont forget to always use the latest git state when testing :)

  • Author

nice.... give me a little time to finish one more job and I'll be back with a feedback!

  • Author

Hi d00p... have tried it out now (the option pops up in the PHP Configurations section) but when the tasks are run it stumbles over $phpconfig['pass_authorizationheader'] giving me an "Undefined index: pass_authorizationheader" in both task scripts...

Now I got to admit I only took and implemented your changes (all of them) in official 0.38.8 and was not using the latest git version. If you think that to be the cause then I will set up a new environment inside a VM.

Cheers and thanks again!

 

Well you need the Database Updates, i recommend the full git-version (its better than.0.9.38.8 anyway :p)

  • Author

oh well I did an ALTER TABLE `panel_tasks` ADD `pass_authorizationheader` tinyint(1) NOT NULL default '0'; prior to anything else... so you'd recommend to go for that one.... btw. does it have these changes (https://github.com/Froxlor/Froxlor/pull/397) inside as well or is that in some other branch? (I'd really love to have PHP-FPM 5.6/7.0/7.1/7.2 running and choosable from within Froxlor!!) :-P

  • Author

Alright, you have me curious now - I'll give it a try today! ;)

  • Author

Alright... here I am and it "nearly" works. There is just the  one glitch I noticed so far:

After "upgrading" to the current git version and re-generating all configuration files apache complained about missing a value for "-idle-timeout". Most of my configuration files had the following inside:

FastCgiExternalServer /var/www/php-fpm/froxlor.panel/panelname.domainname.tld/542e.fpm.external: invalid value for -idle-timeout: ""

I have tried updating the value once in the backend PHP-FPM versions -> (Edit) -> Idle Timeout: by setting the already existing value of 30 to 60 and re-generating the configuration files. But still the call to

Settings::Get('phpfpm.idle_timeout')

always returns empty. My quick fix was to add

$idle_timeout = Settings::Get('phpfpm.idle_timeout');
if (empty($idle_timeout)) {
	$idle_timeout = 60;
}

in both task-include-files (10.apache / 15.apache_fcgid), but that is not the proper way to do it. Since I'd like to avoid reading through all the code to get there, would you mind pointing me to the part which connects the backend-setting (which maintains the correct value after changing it) with the Settings-class?

I'll then be happy to test this for you.

Cheers!

ah, the timeout....that moved from global settings to fpm-daemon specific setting...thanks for noticing :)

  • Author

You're quick... ok I get what you mean... as soon as you point out the function to be used to retrieve that value I'll be quick to test this too (just in case) ;)

Okay, git pull, and you should be good to go

  • Author

Works, thanks d00p!! :lol:

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.