Comments (2)
J'ai pu avancer et faire presque faire marcher le preload en changeant mon bout de code de test.
Ainsi, en procédant comme suit :
const productResp = await fetch("https://localhost:8443/api/produits/1", {
headers: {
Preload: `"/residence"`,
}
});
const product = await productResp.json();
console.log(product);
const residence = await fetch('https://localhost:8443' + product.residence);
console.log(residence.json())
ma requête initiale sur produits/1 reste bloquée :
Et lorsque je regarde les logs du conteneur Vulcain je vois ceci :
172.18.0.1 - - [19/Jan/2022:22:39:23 +0000] "OPTIONS /api/produits/1 HTTP/2.0" 200 23 "https://localhost:3000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"
2022-01-19T22:39:23.266669800Z {"level":"error","ts":1642631963.266287,"caller":"vulcain/server.go:82","msg":"http: proxy error","error":"context canceled","stacktrace":"github.com/dunglas/vulcain.(*server).ServeHTTP.func2\n\t/home/runner/work/vulcain/vulcain/server.go:82\nnet/http/httputil.(*ReverseProxy).ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.2/x64/src/net/http/httputil/reverseproxy.go:290\ngithub.com/dunglas/vulcain.(*server).ServeHTTP\n\t/home/runner/work/vulcain/vulcain/server.go:94\ngithub.com/gorilla/handlers.CompressHandlerLevel.func1\n\t/home/runner/go/pkg/mod/github.com/gorilla/[email protected]/compress.go:100\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.2/x64/src/net/http/server.go:2042\ngithub.com/gorilla/handlers.loggingHandler.ServeHTTP\n\t/home/runner/go/pkg/mod/github.com/gorilla/[email protected]/logging.go:47\ngithub.com/gorilla/handlers.recoveryHandler.ServeHTTP\n\t/home/runner/go/pkg/mod/github.com/gorilla/[email protected]/recovery.go:78\nnet/http.serverHandler.ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.2/x64/src/net/http/server.go:2843\nnet/http.initALPNRequest.ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.2/x64/src/net/http/server.go:3415\nnet/http.(*http2serverConn).runHandler\n\t/opt/hostedtoolcache/go/1.15.2/x64/src/net/http/h2_bundle.go:5718"}
2022-01-19T22:39:23.266736700Z 172.18.0.1 - - [19/Jan/2022:22:39:23 +0000] "GET /api/residences/1 HTTP/2.0" 502 0 "https://localhost:3000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"
Je ne comprends pas le context canceled
qui suit la 200 OPTIONS
sur /api/produits/1 ainsi que la 502 GET
sur /api/residences/1
from vulcain.
Hello @bagullana, pourrais tu me dire quelle a été ta solution ? Merci !
Voici l'erreur que je reçois lors d'un upload d'un gros fichier :
2023-10-18 00:01:30 sceneario_backend_api | 2023/10/17 22:01:30 [warn] 26#26: *189 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000037, client: 172.18.0.11, server: , request: "POST /uploads HTTP/1.1", host: "sceneario-api.saas-production.loc", referrer: "https://sceneario-client.saas-production.loc/"
2023-10-18 00:01:30 sceneario_backend_api | 172.18.0.11 - - [17/Oct/2023:22:01:30 +0000] "POST /uploads HTTP/1.1" 400 0 "https://sceneario-client.saas-production.loc/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"
2023-10-18 00:01:30 sceneario_backend_vulcain | 2023-10-17T22:01:30.332Z ERROR vulcain/server.go:89 http: proxy error {"error": "context canceled"}
2023-10-18 00:01:30 sceneario_backend_vulcain | github.com/dunglas/vulcain.(*server).ServeHTTP.func3
2023-10-18 00:01:30 sceneario_backend_vulcain | /home/runner/work/vulcain/vulcain/server.go:89
2023-10-18 00:01:30 sceneario_backend_vulcain | net/http/httputil.(*ReverseProxy).ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /opt/hostedtoolcache/go/1.21.1/x64/src/net/http/httputil/reverseproxy.go:475
2023-10-18 00:01:30 sceneario_backend_vulcain | github.com/dunglas/vulcain.(*server).ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /home/runner/work/vulcain/vulcain/server.go:102
2023-10-18 00:01:30 sceneario_backend_vulcain | github.com/dunglas/vulcain.(*server).chainHandlers.CompressHandler.CompressHandlerLevel.func4
2023-10-18 00:01:30 sceneario_backend_vulcain | /home/runner/go/pkg/mod/github.com/gorilla/[email protected]/compress.go:141
2023-10-18 00:01:30 sceneario_backend_vulcain | net/http.HandlerFunc.ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /opt/hostedtoolcache/go/1.21.1/x64/src/net/http/server.go:2136
2023-10-18 00:01:30 sceneario_backend_vulcain | github.com/gorilla/handlers.loggingHandler.ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /home/runner/go/pkg/mod/github.com/gorilla/[email protected]/logging.go:47
2023-10-18 00:01:30 sceneario_backend_vulcain | github.com/gorilla/handlers.recoveryHandler.ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /home/runner/go/pkg/mod/github.com/gorilla/[email protected]/recovery.go:78
2023-10-18 00:01:30 sceneario_backend_vulcain | net/http.serverHandler.ServeHTTP
2023-10-18 00:01:30 sceneario_backend_vulcain | /opt/hostedtoolcache/go/1.21.1/x64/src/net/http/server.go:2938
2023-10-18 00:01:30 sceneario_backend_vulcain | net/http.(*conn).serve
2023-10-18 00:01:30 sceneario_backend_vulcain | /opt/hostedtoolcache/go/1.21.1/x64/src/net/http/server.go:2009
2023-10-18 00:01:30 sceneario_backend_vulcain | 172.18.0.2 - - [17/Oct/2023:22:01:30 +0000] "POST /uploads HTTP/1.1" 502 23 "https://sceneario-client.saas-production.loc/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"
from vulcain.
Related Issues (20)
- Package deleted: https://github.com/dunglas/vulcain/caddy HOT 6
- Regression since 0.4.1 HOT 3
- Vulcain does not work "out of the box" with API Platform HOT 3
- Cannot tag Vulcain in Stackoverflow HOT 2
- integration: html - https://htmx.org/examples/ HOT 1
- Http,2,3 vulcain
- Flaky test
- Stateless authorization on preload requests
- Mistagged caddy module? HOT 6
- [Question] Can i use FrankenPHP with Vulcain and cache-handler in single Caddy process?
- Curren state HOT 2
- Preload link should include the "crossorigin" attribute, if initial request uses CORS
- Link Varnish X-Key broken HOT 1
- Fields issue on preload entity HOT 3
- Unable to decode with compressed response from origin HOT 1
- Preload only working on localhost HOT 1
- Request made by the browser does not contain the "authorization" header
- Response's body is percent encoded when parametrized queries HOT 1
- Re-add Server Push tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulcain.