Say I have a variable URL = 'http://200.0.0.0:10' and I use this in all of my calls like this (URL + '/logon') as my path. If you go into Google's dev tools you can find my address and port (the URL variable).
How can I hide my URL variables (address & port) in Angular?
ANY suggestions are welcome, I just don't want the front end to be able to know what my address & port is (or any other important variables I would like to hide).
I have tried:
- Putting the
URLvariable in ashared.service.tsand then creating the url like this(this.sharedservice.URL + '/logon'). This doesn't work because you can still see thesharedservice.URLvariable from the front end. - Putting the
URLvariable in theenvironment.tsand then creating the url like this(environment.URL + '/logon'). This doesn't work because ng build compiles the url path into this:('http://200.0.0.0:10' + '/logon')