27 aug. 2019 kl. 14:30 skrev Martin van Es <martin
at surfnet.nl>:
On Tuesday, August 27, 2019 8:32:52 AM CEST
Martin van Es wrote:
Curious if this can be
simplified for the HTTP_HOST=BASE_URL=STORAGE_DOMAIN=MDQ_URL by making all
URL's relative when the thiss-js code resides in the root of the same
server as the pyff daemon and is served on the same URL?
Managed to webpack a working dist root using the following HOST agnostic
webpack config:
module.exports = merge(common, {
mode: 'production',
plugins: [
new webpack.EnvironmentPlugin({
BASE_URL: '/',
COMPONENT_URL: '/cta/',
MDQ_URL: "/entities/",
PERSISTENCE_URL: '/ps/',
SEARCH_URL: "api/search",
STORAGE_DOMAIN: "/",
LOGLEVEL: 'error',
DEFAULT_CONTEXT: "/"
})
]
});
I don't know if "/" is a valid STORAGE_DOMAIN or CONTEXT, but it seems to
work.
loopback?
I’m pretty sure it won’t work in prod bc of how cross-origin postMessage works