brata-hsdc / brata.masterserver

Behind-the-scenes coordination and support for the HSDC
Apache License 2.0
1 stars 0 forks source link

Add MS_SERVER_HOST_ADDRESS to Settings #82

Open ellerychan opened 8 years ago

ellerychan commented 8 years ago

The MS may operate behind a proxy firewall, so it may be difficult or impossible for it to determine its externally-facing address. We will store that in the Setting table in a variable called MS_SERVER_HOST_ADDRESS.

ellerychan commented 8 years ago

@jaron42 I added MS_EXTERNAL_HOST_ADDRESS to the _MSSettings.xlsx file.

However, I don't think it is necessary for the outward-facing MS server pages. I rewrote them to use Django's reverse URL lookup. You can do that from within a view using the reverse() function, and you can do it in a template using the {% url %} template tag.

I guess you would still need it for your QR code generator if you access it from inside the firewall but want it to create QR codes for outside the firewall. Maybe it would make more sense to enter the desired server host address in a form before generating the QR codes.

Please let me know what you think.

ellerychan commented 8 years ago

Note: The variable I added is named MSEXTERNALHOST_ADDRESS not MSSERVERHOST_ADDRESS.

ellerychan commented 8 years ago

Addressed by Pull Request #83