Routing through Azure app service IIS #81492
Unanswered
9676-307031
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi Team ,
Seeking for some help to fix below issue
Current we are using Sitecore jss next js infrastructure for our application and to get images or pdfs we need to call sitecore internally and rewrite rules are below
// Rewrites for Sitecore proxy paths
async rewrites() {
console.log('Configuring rewrites...');
return [
// API endpoints
{
source: '/sitecore/api/:path*',
destination:
${sitecoreApiHost}/sitecore/api/:path*
,},
// Media items
{
source: '/-/:path*',
destination:
${sitecoreApiHost}/-/:path*
,},
// Health check
{
source: '/healthz',
destination: '/api/healthz',
},
// Rewrite for Sitecore service pages
{
source: '/sitecore/service/:path*',
destination:
${sitecoreApiHost}/sitecore/service/:path*
,},
];
},
Currently we are hosting on azure node IIS and to access these images we need to append/en after website hostname else image is not load but from sitecore it works fine for both with en and without en .
example of urls
Image src : /-/media/Project/PWS/Healthcare/Images/Common/Hero/Herov3image-final.png?h=618&iar=0&w=1440&hash=C365BCE79493C7A669E2497591C7A959
websitehost :
https://pws-d1.abc.com/en/-/media/Project/PWS/Healthcare/Images/Common/Hero/Herov3image-final.png?h=618&iar=0&w=1440&hash=C365BCE79493C7A669E2497591C7A959 - Working
https://pws-d1.abc.com/-/media/Project/PWS/Healthcare/Images/Common/Hero/Herov3image-final.png?h=618&iar=0&w=1440&hash=C365BCE79493C7A669E2497591C7A959- Not working
sitecore host
https://pws-d1-sc-cd.abc.com/-/media/Project/PWS/Healthcare/Images/Common/Hero/Herov3image-final.png?h=618&iar=0&w=1440&hash=C365BCE79493C7A669E2497591C7A959 Working
https://pws-d1-sc-cd.abc.com/en/-/media/Project/PWS/Healthcare/Images/Common/Hero/Herov3image-final.png?h=618&iar=0&w=1440&hash=C365BCE79493C7A669E2497591C7A959 working
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions