Base solution for your next web application
Open Closed

[appBaseUrl] multiple url as clients #6611


User avatar
0
daws created

Hello,

for deployement, i need to install my app/server within a LAN and use it on both LAN and WAN with distinct URLs.

  • LAN server (hosting everything) :
    • ip : 192.168.1.100
    • name : server
  • version : latest aspnetzero core (angular)

i need to be accessed by LAN, which i does by

appconfig.json (client abp) :

  "remoteServiceBaseUrl": "http://server:41010",
  "appBaseUrl": "http://server",

appsettings.json (backend)

    "ServerRootAddress": "http://server:41010/",
    "ClientRootAddress": "http://server/",
    "CorsOrigins": "http://server",

that works fine.

Next step is to also allow the application to be accessible via WAN.

The required url is something like that : "http://server.xxx.xxxx.xx" And that's where i'm blocked.

the "appBaseUrl" defined is used by CORS on server to validate the request. I either can put the "http://server" or "http://server.xxx.xxxx.xx" but not both of them.

Do you have any idea how i can resolve that ?

knowing that ... :

  • i can't modify the existing firewall & proxy => everything should remain on :80 port for client part.
  • they want to use in LAN the short url, not the full one

the only possibility that I see is to duplicate the client/frontend in 2 separate sites, and create virtual folders on IIS to keep the same port. It seems a little bit complex.

So, my question is : can we use multiple client URL "appBaseUrl") : "http://server" "http://server.xxx.xxxx.xx" in a single frontend app configuration, and allowing these urls in CORSORIGINS in backend ?

nb : sorry if it's a silly question, i didn't found any related question in the forum.

thanks !

daws


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    So, my question is : can we use multiple client URL "appBaseUrl") :

    As far as I know, this is not possible. Have you tried adding multiple values to CorsOrigins for server-side app config ?