#3526 - $util.srl must be used consistently
| Identifier | #3526 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | $util.srl must be used consistently |
| Status | Completed |
| Handling member | Salman |
| Addon | General / Uncategorised |
| Description | The screenshot shows it is not.
$util.srl is important for sites that run both HTTPS and HTTP. There are practical situations where we have sites like this. For example, legacy iframes that only support HTTP. If running a reverse proxy, Composr will not know which is running, so we cannot stop the exact same JS being served. We therefore need to strip the protocol, as your $util.srl function does. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
(Click to enlarge)
- $BASE_URL_NOHTTP
- $FIND_SCRIPT_NOHTTP
- $IMG used in conjunction with $util.srl
In all cases it allows provides when running both HTTPS and HTTP together.
In the case of $FIND_SCRIPT_NOHTTP it also provides safety for multi-domain environments.
Composr uses absolute URLs throughout, to radically simplify things, such as not having to be knowing where you're relative to, the need for portable context-free code, and the need for PHP itself to call up URLs outside any context.
This is fine and dandy in all situations except JS, which has it's various sandboxing limitations.