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

Switch to use relative paths for API urls #16

Closed
piotrzarzycki21 opened this issue Apr 19, 2023 · 2 comments
Closed

Switch to use relative paths for API urls #16

piotrzarzycki21 opened this issue Apr 19, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@piotrzarzycki21
Copy link
Contributor

          @piotrzarzycki21,

I tested deploying this artifact to a Super.Human.Installer Domino instance for #15. Unfortunately, this failed with a CORS error on the agent calls. The agent calls use http://127.0.0.1:8080, but the Super.Human.Installer server should be called with a domain name. The default is https://domino.demo.startcloud.com, but the user is allowed to choose other names.

To allow this to work, I had to change the URL at two locations:

./js-release/SuperHumanPortal_Royale.js:'handleStepChange',kh='handleTopMostEventDispatcherMouseDown',lh='has-drawer',mh='headerModelChanged',nh='height',oh='heightChanged',ph='hidden',qh='hidden-desktop',rh='hidden-widescreen',sh='horizontalContentItemsCenteredFormItem',th='horizontalContentShrinkFormItem',uh='htmlChange',vh='htmlMessageChange',wh='htmlTitleChange',xh='http://127.0.0.1:8080',yh='i.fonticon.material-icons',zh='iBeadLayout',Ah='iContentView',Bh='iFormItemContentArea',Ch='iItemRendererClassFactory',Dh='iItemRendererInitializer',
./js-release/SuperHumanPortal_Royale.js:F.um=function(a){this.model.fullContentWidth=a};Object.defineProperties(xH.prototype,{label:{get:xH.prototype.xb,set:xH.prototype.Wb},labelClass:{get:xH.prototype.rh,set:xH.prototype.Em},required:{get:xH.prototype.Ab,set:xH.prototype.Xb},labelAlign:{get:xH.prototype.gc,set:xH.prototype.de},fullContentWidth:{get:xH.prototype.hh,set:xH.prototype.um}});xH.prototype.g={names:[{name:'CustomFormItem',h:ww,kind:t}]};function oK(){}G(kd,oK);oK.AGENT_BASE_URL='http://127.0.0.1:8080/SuperHumanPortal.nsf';G('Super.Human.Portal_Royale.classes.vo.Constants.AGENT_BASE_URL',oK.AGENT_BASE_URL);oK.prototype.g={names:[{name:'Constants',h:kd,kind:t}]};Object.keys(oK);function LH(){CL.call(this);this.typeNames='jewel drawer '+LH.FLOAT}H(LH,CL);G(Ep,LH);LH.FLOAT='float';G('org.apache.royale.jewel.Drawer.FLOAT',LH.FLOAT);LH.FIXED=Cg;G('org.apache.royale.jewel.Drawer.FIXED',LH.FIXED);F=LH.prototype;F.EC=function(a){I(a.target,HTMLElement).classList.contains(dg)&&this.close()};F.adjustAppScroll=function(){this.fixed?document.body.classList.remove(Jw):this.Hb?document.body.classList.add(Jw):document.body.classList.remove(Jw)};F.open=function(){this.isOpen=!0};

I had similar problems on domino-49. Can we make these paths relative to the server base (i.e. /Super.Human.Portal.nsf/XMLAuthenticationTest?OpenAgent) so that we don't need to change this? The Genesis installer for #15 won't necessarily know the base FQDN of the generated server.

Originally posted by @JoelProminic in #14 (comment)

@piotrzarzycki21 piotrzarzycki21 self-assigned this Apr 19, 2023
@piotrzarzycki21 piotrzarzycki21 added the enhancement New feature or request label Apr 19, 2023
@piotrzarzycki21
Copy link
Contributor Author

@JoelProminic I have switched this to relative urls.

@JoelProminic
Copy link
Contributor

This is working properly on the Super.Human.Installer instance now. Thanks!

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

2 participants