Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make baseHref/publicURL automatic and supportive of CSPInstanceName #17

Open
isc-tleavitt opened this issue Aug 16, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@isc-tleavitt
Copy link
Collaborator

isc-tleavitt commented Aug 16, 2024

Rather than doing tricky web application replacements at package activation time, it would be better if the static file handlers supported setting the base URL (for both Angular and React) at runtime based on %request.Application which will possibly include the CSPInstanceName.

e.g., if I have a web application /personal, and it's served via CSPInstanceName iris20241, %request.Application will have /iris20241/personal/. This should automatically be set as the base URL in staticFilesHandler.

Taking this approach will support cases where the same instance is accessed both with and without a CSPInstanceName and avoid needing a fraught and super-ugly publicURL expression, like:

<Resource Name="/react/copilot-mockup" ProcessorClass="pkg.isc.ipm.js.react.processor" publicURL="#{$Select($Data(^%SYS(&quot;WebServer&quot;,&quot;URLPrefix&quot;),prefix)#2&amp;&amp;(prefix'=&quot;&quot;):&quot;/&quot;_prefix,1:&quot;&quot;)}/personal" />

An error in which ended up leading to #16 .

For the sake of performance we'll probably want to cache file contents with URL replacements performed.

@isc-tleavitt isc-tleavitt added the enhancement New feature or request label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant