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
Is your feature request related to a problem? Please describe.
Currently from (jss/packages/sitecore-jss/src/mediaApi.ts) we have a regex:
// finds the Sitecore media URL prefix
const mediaUrlPrefixRegex = //([-~]{1})/media//i;
This Url prefix is configurable in Sitecore but not from jss as it is hardcoded in the regex pattern. Would it be possible to make these Url prefix configurable?
Describe the solution you'd like
I should be able to configure the urls and handle the request appropriately as we handle in Sitecore.
Ex: We should be handle /-assets/
Describe alternatives you've considered
We are currently looking at the options to resolve this issue:
Fork and amend the existing code ?
Rewrite the url to handle the requests?
Additional information
N/A
The text was updated successfully, but these errors were encountered:
RashmiSrinivas1
changed the title
Unable to configure url prefix ( miss-alignment with sitecore)
Unable to configure url prefix ( Non-alignment with sitecore)
May 22, 2019
@RashmiSrinivas1 Feature added in #419
You will have ability to use mediaUrlPrefix in the Image component, in all frameworks.
/**
* Custom regexp that finds media URL prefix that will be replaced by `/-/jssmedia` or `/~/jssmedia`.
* @example
* /\/([-~]{1})assets\//i
* /-assets/website -> /-/jssmedia/website
* /~assets/website -> /~/jssmedia/website
*/
Is your feature request related to a problem? Please describe.
Currently from (jss/packages/sitecore-jss/src/mediaApi.ts) we have a regex:
// finds the Sitecore media URL prefix const mediaUrlPrefixRegex = //([-~]{1})/media//i;
This Url prefix is configurable in Sitecore but not from jss as it is hardcoded in the regex pattern. Would it be possible to make these Url prefix configurable?
Describe the solution you'd like
I should be able to configure the urls and handle the request appropriately as we handle in Sitecore.
Ex: We should be handle /-assets/
Describe alternatives you've considered
We are currently looking at the options to resolve this issue:
Additional information
N/A
The text was updated successfully, but these errors were encountered: