Skip to content

Commit edd8ea8

Browse files
authored
Update index.js
1 parent fde7595 commit edd8ea8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

addon/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4436,6 +4436,7 @@ addon.get("/poster/:type/:id", async function (req, res) {
44364436
// SD experimenting with local nginx reverse proxy cache
44374437
let proxyServerPrefix = "http://192.168.0.56:1337/proxy/";
44384438
let proxyPosterUrl = proxyServerPrefix + "" + posterUrl;
4439+
consola.success(`Built proxy poster url for ${id}: `, proxyPosterUrl);
44394440
if (proxyPosterUrl && await checkIfExists(proxyPosterUrl)) {
44404441
//console.log("Success! Pipe the image from rating provider directly to the user.");
44414442
const imageResponse = await axios({
@@ -4448,6 +4449,7 @@ addon.get("/poster/:type/:id", async function (req, res) {
44484449
res.setHeader('X-Cache-Status', imageResponse.headers['X-Cache-Status']); // Passing through NGINX cache headers
44494450
res.setHeader('X-Cache-Response-Time', imageResponse.headers['X-Cache-Response-Time']); // Passing through NGINX cache headers
44504451
imageResponse.data.pipe(res);
4452+
consola.success(`Delivered poster for ${id} via proxy: `, proxyPosterUrl);
44514453
} else if (posterUrl && await checkIfExists(posterUrl)) {
44524454
//console.log("Success! Pipe the image from rating provider directly to the user.");
44534455
const imageResponse = await axios({

0 commit comments

Comments
 (0)