Daml-ui-template Error
- Arvind_RaoOP 2
Hi, I just got the latest template project from GitHub - digital-asset/daml-ui-template and followed the instructions to get the UI running using JS.
However when I try to exercise an option (GIVE), the sandbox shows the following errors.
14:07:13.846 [http-json-ledger-api-akka.actor.default-dispatcher-11] WARN akka.actor.ActorSystemImpl - Illegal header: Illegal 'origin' header: Illegal origin: Invalid input '/', expected DIGIT or 'EOI' (line 1, column 22): http://localhost:7575/Please advise.
- georg 3
That warning is not of concern, I get it too all the time - but not sure why. I think it’s some strange header that the browser sets. The command should still go through though. Can you confirm?
- Arvind_Rao 2
Yes, looks like its working ok. I stopped it after seeing the warning

Thanks
- georg 1
Agree, it’s quite confusing when you first see it. Maybe someone with more intimate knowledge of the JSON API can chime in to understand why that’s being logged.
- Leonid_Shlyapnikov 1
I have not seen it when used JSON API directly (create/exercise), might be related to how daml-ui constructs the HTTP Header.
@Arvind_Rao do you have a reverse proxy set up in front of the JSON API, anything that could modify the HTTP Header?
Illegal header: Illegal 'origin' header: Illegal origin: Invalid input '/', expected DIGIT or 'EOI' (line 1, column 22): http://localhost:7575/My understanding, the Akka HTTP library that we use does not like
/at the end of the origin header. Looking at the documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/OriginOrigin: null Origin: <scheme> "://" <hostname> [ ":" <port> ]so according to the spec,
/is not allowed at the end of the origin. - Arvind_Rao 1
Nope, no proxy etc setup. Just ran the sample out of box with no changes on Windows 10
- cocreature 1
Are you using
yarn start? That does involve a proxy. - Leonid_Shlyapnikov
@Martin_Huschenbett @shaynefletcher I guess we need to remove
github.com/at the end of the proxy config.
digital-asset/daml-ui-template/blob/ec8294113ccecf4005a1405fd625d345034d08e4/ui-js/package.json#L54
- ">0.2%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 1 chrome version",
- "last 1 firefox version",
- "last 1 safari version"
- ]
- },
- "proxy": "http://localhost:7575/"
- }
@Arvind_Rao if you change
package.jsonsoproxydoes not have a trailing slash, the warning should go away:"proxy": "http://localhost:7575"Please let us know if this fixed the warning and we will update the template.
- Gary_Verhaegen 2
I can reproduce, and I can confirm removing the trailing
/in thepackage.jsonfile resolves the issue (i.e. no more warning). - Gary_Verhaegen 4
Fix has been merged. Thanks @Arvind_Rao for the bug report!