* fix: update to latest sapper fixes #416 * fix error and debug pages * requestIdleCallback makes column switching feel way nicer than double rAF * add export feature * add better csp info * workaround for sapper sub-page issue * clarify in readme about exporting * fix now config * switch from rIC to triple raf * style-loader is no longer used * update theming guide
16 lines
395 B
JavaScript
16 lines
395 B
JavaScript
function targetIsLocalhost (instanceName) {
|
|
return instanceName.startsWith('localhost:') || instanceName.startsWith('127.0.0.1:')
|
|
}
|
|
|
|
export function basename (instanceName) {
|
|
if (targetIsLocalhost(instanceName)) {
|
|
return `http://${instanceName}`
|
|
}
|
|
return `https://${instanceName}`
|
|
}
|
|
|
|
export function auth (accessToken) {
|
|
return {
|
|
'Authorization': `Bearer ${accessToken}`
|
|
}
|
|
}
|