You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a load-balancing and CDN situation where the instance is a different hostname or responding to a different hostname than the actual published URL, setting SERVER_NAME to the CDN hostname might break routing - flask replies with 404 on every endpoint route because the SERVER_NAME doesn't match the host header it gets from 'upstream'.
But not setting SERVER_NAME makes flask guess about the protocol scheme and hostname and you might get some weird host in your m3u8 that points to a local instance that is not publically accessable. like http://172.31.21.141/i/path/to/file.mp4/index_0_av.m3u8 and the streams fail to play.
so, look carefully at casterpak.py 'get_base_url' and decide what's best. right now we don't tell flask what the server name is and manually construct the base url without using 'url_for()' and maybe that's ok. I don't know.
The text was updated successfully, but these errors were encountered:
flask's SERVER_NAME setting is bothersome.
I stopped using url_for() - maybe for good?
In a load-balancing and CDN situation where the instance is a different hostname or responding to a different hostname than the actual published URL, setting SERVER_NAME to the CDN hostname might break routing - flask replies with 404 on every endpoint route because the SERVER_NAME doesn't match the host header it gets from 'upstream'.
But not setting SERVER_NAME makes flask guess about the protocol scheme and hostname and you might get some weird host in your m3u8 that points to a local instance that is not publically accessable. like http://172.31.21.141/i/path/to/file.mp4/index_0_av.m3u8 and the streams fail to play.
so, look carefully at casterpak.py 'get_base_url' and decide what's best. right now we don't tell flask what the server name is and manually construct the base url without using 'url_for()' and maybe that's ok. I don't know.
The text was updated successfully, but these errors were encountered: