Commit bb91161a authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Serve a custom /config to correctly setup websocket for proxies

This commit extends the reverse proxy for the microservices so that it
would serve a custom `/config` file which would contain the correct
baseUrl to initialise the websocket connection correctly.
parent d2d35f97
...@@ -18,8 +18,8 @@ fi ...@@ -18,8 +18,8 @@ fi
# with the `sha256sum` result calculated on the `cabal.project` and # with the `sha256sum` result calculated on the `cabal.project` and
# `cabal.project.freeze`. This ensures the files stay deterministic so that CI # `cabal.project.freeze`. This ensures the files stay deterministic so that CI
# cache can kick in. # cache can kick in.
expected_cabal_project_hash="a05d90186f5c5d90cb6e806ffc38379af89a52d4289dd70def9e48ed8315fdd6" expected_cabal_project_hash="22167800d98d4f204c85c49420eaee0618e749062b9ae9709719638e54319ae9"
expected_cabal_project_freeze_hash="3c64f68973846df84c31708abefcc95119eef58317a569d9a5940821b27b9d66" expected_cabal_project_freeze_hash="7bb3ba71d0a1881a5c4fd420b9988155586e0cf51e9b6d55867bce3d311d59a5"
cabal --store-dir=$STORE_DIR v2-build --dry-run cabal --store-dir=$STORE_DIR v2-build --dry-run
cabal2stack --system-ghc --allow-newer --resolver lts-21.17 --resolver-file devops/stack/lts-21.17.yaml -o stack.yaml cabal2stack --system-ghc --allow-newer --resolver lts-21.17 --resolver-file devops/stack/lts-21.17.yaml -o stack.yaml
......
...@@ -169,7 +169,7 @@ source-repository-package ...@@ -169,7 +169,7 @@ source-repository-package
source-repository-package source-repository-package
type: git type: git
location: https://github.com/adinapoli/http-reverse-proxy.git location: https://github.com/adinapoli/http-reverse-proxy.git
tag: e746dfbe557ce131af1090e1c413fee16675c8e0 tag: c90b7bc55b0e628d0b71ccee4e222833a19792f8
allow-older: * allow-older: *
allow-newer: * allow-newer: *
......
...@@ -283,7 +283,7 @@ constraints: any.Cabal ==3.8.1.0, ...@@ -283,7 +283,7 @@ constraints: any.Cabal ==3.8.1.0,
http-conduit +aeson, http-conduit +aeson,
any.http-date ==0.0.11, any.http-date ==0.0.11,
any.http-media ==0.8.1.1, any.http-media ==0.8.1.1,
any.http-reverse-proxy ==0.6.0.3, any.http-reverse-proxy ==0.6.1.0,
any.http-types ==0.12.3, any.http-types ==0.12.3,
any.http2 ==4.1.4, any.http2 ==4.1.4,
http2 -devel -h2spec, http2 -devel -h2spec,
......
...@@ -15,6 +15,7 @@ allowed-origins = [ ...@@ -15,6 +15,7 @@ allowed-origins = [
, "https://msh.sub.gargantext.org" , "https://msh.sub.gargantext.org"
, "https://dev.sub.gargantext.org" , "https://dev.sub.gargantext.org"
, "http://localhost:8008" , "http://localhost:8008"
, "http://localhost:8009"
] ]
use-origins-for-hosts = true use-origins-for-hosts = true
......
...@@ -564,7 +564,7 @@ library ...@@ -564,7 +564,7 @@ library
, http-conduit ^>= 2.3.8 , http-conduit ^>= 2.3.8
, http-media ^>= 0.8.0.0 , http-media ^>= 0.8.0.0
, http-types ^>= 0.12.3 , http-types ^>= 0.12.3
, http-reverse-proxy , http-reverse-proxy >= 0.6.1.0
, hxt ^>= 9.3.1.22 , hxt ^>= 9.3.1.22
, ihaskell >= 0.11.0.0 , ihaskell >= 0.11.0.0
-- necessary for ihaskell to build -- necessary for ihaskell to build
...@@ -617,6 +617,7 @@ library ...@@ -617,6 +617,7 @@ library
, quickcheck-instances ^>= 0.3.25.2 , quickcheck-instances ^>= 0.3.25.2
, rake ^>= 0.0.1 , rake ^>= 0.0.1
, random ^>= 1.2.1 , random ^>= 1.2.1
, raw-strings-qq
, rdf4h ^>= 3.1.1 , rdf4h ^>= 3.1.1
, recover-rtti >= 0.4 && < 0.5 , recover-rtti >= 0.4 && < 0.5
, regex , regex
......
...@@ -97,7 +97,7 @@ mkNodeWithParent_ConfigureHyperdata _ _ _ _ = nodeError NotImplYet ...@@ -97,7 +97,7 @@ mkNodeWithParent_ConfigureHyperdata _ _ _ _ = nodeError NotImplYet
internalNotesProxy :: MicroServicesSettings -> T.Text internalNotesProxy :: MicroServicesSettings -> T.Text
internalNotesProxy MicroServicesSettings{..} = internalNotesProxy MicroServicesSettings{..} =
"http://localhost:" <> T.pack (show _msProxyPort) "http://localhost:" <> T.pack (show _msProxyPort) <> "/notes"
-- | Function not exposed -- | Function not exposed
mkNodeWithParent_ConfigureHyperdata' :: (HasNodeError err, HasDBid NodeType, HasSettings env) mkNodeWithParent_ConfigureHyperdata' :: (HasNodeError err, HasDBid NodeType, HasSettings env)
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
git: "https://github.com/MercuryTechnologies/ekg-json.git" git: "https://github.com/MercuryTechnologies/ekg-json.git"
subdirs: subdirs:
- . - .
- commit: e746dfbe557ce131af1090e1c413fee16675c8e0 - commit: c90b7bc55b0e628d0b71ccee4e222833a19792f8
git: "https://github.com/adinapoli/http-reverse-proxy.git" git: "https://github.com/adinapoli/http-reverse-proxy.git"
subdirs: subdirs:
- . - .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment