# Nodered environment with mutiple urls

**URL:** https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246
**Category:** General
**Created:** [23 March 2022 14:28 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246 "2022-03-23T14:28:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DJDev](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DJDev](https://discourse.nodered.org/u/DJDev)
#### Post date: [23 March 2022 14:28 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/1 "2022-03-23T14:28:47Z")

</div>

Hi,

If there are multiple urls(different domains) configured to the same nodered environment, what would be the best way to retrieve the url in NodeRed? The same applies to added params in the url. I have to know this before a user has logged in into NodeRed.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [23 March 2022 18:08 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/2 "2022-03-23T18:08:38Z")

</div>

Are you talking about the Editor or the Dashboard or something else here? It makes a difference to how logins might work.

---

<div class="post-metadata">

### Author: ![DJDev](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DJDev](https://discourse.nodered.org/u/DJDev)
#### Post date: [21 April 2022 07:17 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/3 "2022-04-21T07:17:34Z")

</div>

Sorry for the late reply. In my scenario users will have to log in using the admin page. And a passport strategy implemented (oauth\oidc authentication).  
If a strategy is used, it is possible to add a label and an icon. which will be used to generate a button a user has to click on in order to authenticate. Is it possible to customize the layout with my own html\css\javascript? If yes, where is the file stored that contains the current layout configuration?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 April 2022 08:40 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/4 "2022-04-21T08:40:10Z")

</div>

Not sure what you get with the auth strategy, you'd have to dump some things to the log to find out. In the editor, you certainly have access to the URL since it is a browser app.

---

<div class="post-metadata">

### Author: ![DJDev](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DJDev](https://discourse.nodered.org/u/DJDev)
#### Post date: [21 April 2022 12:00 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/5 "2022-04-21T12:00:57Z")

</div>

If I look at the html of the node red interface in the admin page. I can see the layout of the button. Including the span in which the label text is embedded. Is it possible to edit the default layout? For instance to add a script?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 April 2022 12:10 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/6 "2022-04-21T12:10:27Z")

</div>

Anything is _possible_, the joy of HTML. Whether it is robust may be a different matter. We would probably need Nick to chip in there.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [21 April 2022 12:45 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/7 "2022-04-21T12:45:38Z")

</div>

Via the `editorTheme` setting in your settings.js file, you can provide paths to scripts that should be loaded into the editor.

Those scripts can then do whatever customisation you want to the page.

[https://nodered.org/docs/user-guide/runtime/configuration#editor-themes](https://nodered.org/docs/user-guide/runtime/configuration#editor-themes)

```auto
editorTheme: {
   page: {
      scripts: ["/absolute/path/to/custom/script/file.js"]
   }
}

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [20 May 2022 11:50 UTC](https://discourse.nodered.org/t/nodered-environment-with-mutiple-urls/60246/8 "2022-05-20T11:50:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
