CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
63 stars 44 forks source link

Refactor logic used for updating lane status #1092

Closed lgedgar closed 3 years ago

lgedgar commented 3 years ago

this consolidates the logic used to write LANES setting to Fannie config file. also the CheckLanesTask can now use this logic instead of invoking a HTTP request

This is yet another take on #1080.

Hit a snag with how Fannie config may be used to build a URL for use with POSTing new lane status. And since we already knew the approach wouldn't work if Fannie auth was enabled, I figure this is better?

gohanman commented 3 years ago

This looks reasonable enough. Can you add onto what the URL building issue was? That's more a more broadly useful thing to be able to do - e.g., put a link in a notification message - and it might be helpful to know where pitfalls are in certain environmental setups.

lgedgar commented 3 years ago

This may be a bit of confusion resulting in a mis-configured $FANNIE_HTTP_HOST setting? Is that used for anything other than generating links like you mention? If not then it probably would have been a safe fix, just to update the setting in question...

gohanman commented 3 years ago

It looks like the only place where it's used for something other than a link in a notification message is on the "Theming" tab in the install/config section where it's used to show what HTTP headers the server is sending. This is just debugging information for handling non-ASCII values - form values will be submitted in whatever character encoding the browser thinks the page is using, and header values sometimes take priority over anything you put in a <meta>.