Przeglądaj źródła

Merge pull request #7630 from overleaf/csh-issue-7543-rails-v1-run-in-GKE

Run rails-v1 on GKE

GitOrigin-RevId: b8138a40da6279b7df68e3b9e0d308939c843679
Christopher Hoskin 4 lat temu
rodzic
commit
51f5f80e2d

+ 1 - 1
services/web/app/src/Features/BrandVariations/BrandVariationsHandler.js

@@ -78,5 +78,5 @@ function setV1AsHostIfRelativeURL(urlString) {
   // As it only applies if the second argument is not absolute, we can use it to transform relative URLs into
   // absolute ones using v1 as the host. If the URL is absolute (e.g. a filepicker one), then the base
   // argument is just ignored
-  return new URL(urlString, settings.apis.v1.url).href
+  return new URL(urlString, settings.apis.v1.publicUrl).href
 }

+ 4 - 2
services/web/test/unit/src/BrandVariations/BrandVariationsHandlerTests.js

@@ -26,7 +26,7 @@ describe('BrandVariationsHandler', function () {
     this.settings = {
       apis: {
         v1: {
-          url: 'http://overleaf.example.com',
+          publicUrl: 'http://overleaf.example.com',
         },
       },
       modules: {
@@ -111,7 +111,9 @@ describe('BrandVariationsHandler', function () {
         '12',
         (err, brandVariationDetails) => {
           expect(
-            brandVariationDetails.logo_url.startsWith(this.settings.apis.v1.url)
+            brandVariationDetails.logo_url.startsWith(
+              this.settings.apis.v1.publicUrl
+            )
           ).to.be.true
           return done()
         }