1

We currently have some API endpoints on jAgent. These are all Http ones. I am calling these APIs from my Angular application to communicate with the jBase backend. We just hosted the Angular app on Https with a Self-signed certificate only to realise the API calls fail with the error message, "The page at 'https://*' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://'. This request has been blocked; the content must be served over HTTPS."

Is there a way to make the endpoints on jAgent https so that we can resolve this?

Anjana
  • 25
  • 6

1 Answers1

1

You can indeed configure jAgent to use SSL so that you can serve requests over HTTPS. There's too much to copy/paste here in full but in short please refer to jAgent Administration: jAgent Configuration File and note these comments:

; For SSL connections, specify the path of the x509 certificate to
; use. When a certificate is specified, a private key must also be
; specified. This option duplicates the -c (--certificate) command
; line option.
;certificate = <path to certificate (.pem) file>

; For SSL connections, specify the path of the private key for the
; certificate being used. This option duplicates the -k (--private_key)
; command line option.
;private_key = <path to private key (.pem) file>

And also please refer to jAgent Security for additional context. It is possible to specify the cert and key via command line args when running jAgent, or (recommended) to set within the config and take care to specify the config. This command illustrates both:

jbase_agent -c cert.pem -k key.pem --config %HOME%\jagent_config

Mike Wright
  • 502
  • 4
  • 13
  • 1
    Thanks for the guidance Mike! Got it working! – Anjana Jan 29 '21 at 00:06
  • Excellent! I appreciate you bringing jBASE questions to Stack Overflow--we're all about pushing MultiValue into this space as it's kind of underrepresented. That said, keep in mind you can also email support@zumasys.com to interact direct with the support team at large. If you're open I'd also love to connect at some point to hear more about how you're using jBASE! – Mike Wright Jan 29 '21 at 00:22
  • 1
    Sounds good @Mike. I am actually a front-end developer working with jBASE developers. I'm new to jBASE, but also quite interested in it. Will keep in touch. Thanks! – Anjana Jan 29 '21 at 01:15