frankjonen
04/28/2023, 1:22 AMfrankjonen
04/28/2023, 1:39 AMChaika
04/28/2023, 1:42 AMdata-static-form-name
attribute to be set to anything), you have the functions folder in your root (not in your output directory) with the _middleware.ts file, you can see in build logs under the functions tab, the middleware listed under route configuration?zizi
04/28/2023, 1:14 PMkian
04/28/2023, 1:16 PMzizi
04/28/2023, 1:17 PMHardAtWork
04/28/2023, 1:17 PMJames
04/28/2023, 2:57 PMhjpotter92
04/28/2023, 5:32 PMworkers.dev
? i'm deploying a worker which would be called from a minimal https client; and it needs the CA certs to validate TLS/SSL connectionhjpotter92
04/28/2023, 5:32 PMHardAtWork
04/28/2023, 5:43 PMhjpotter92
04/28/2023, 6:27 PMopenssl
to get the chain instead:
sh
openssl s_client -showcerts -verify 5 -connect <domain>:443
Wichard
04/28/2023, 7:13 PMWichard
04/28/2023, 7:17 PMbtc10mm
04/28/2023, 8:06 PMexample.com/*
is firing for example.com/cart.js
but not example.com/
or example.com/?debug
or example.com/products/foo
. I can see the cart.js come across both streaming worker logs as well as instant logs, but not the other requestskian
04/28/2023, 8:48 PMkian
04/28/2023, 8:48 PMWichard
04/29/2023, 8:42 PMkian
04/29/2023, 8:42 PMnew_with_init
kian
04/29/2023, 8:42 PMWichard
04/29/2023, 8:43 PMkian
04/29/2023, 8:43 PMkian
04/29/2023, 8:43 PMkian
04/29/2023, 8:44 PMrs
JsValue::from(
serde_json::to_string(&payload)?
);
olieollyollie
04/29/2023, 10:08 PMTLS peer's certificate is not trusted; reason = unable to get local issuer certificate
? i'm running wrangler dev --experimental-local --experimental-local-remote-kv --persist
and trying to put values in a KV namespace. strangely enough, the request does actually reach the KV storage and the value is stored, it just throws this error after each put. my platform is windows 10.Serby
04/30/2023, 3:20 AM*
.domain. com and then use the request or Orgin header to either regex and strip to capture the "sub". part to perfom a query / redirect if the query turns up null for example is this possible with the workers, the only thing ive found for subdomains are like the CAA records but thats not what I need since i need `*`wild cardsSerby
04/30/2023, 3:27 AM/*masted redirect*/
const DESTINATION = ‘sub.domain.com’;
const ORIGINS = {
‘/some-sub-directory: ‘/some-sub-dirctory’,
};
addEventListener(“fetch”, event => {
let requestURI = new URL(event.request.url);
if (requestURI.pathname in ORIGINS) {
event.respondWith(rewriteURL(event.request));
}
})
async function rewriteURL(request) {
var URI = new URL(request.url);
URI.protocol = “https”;
URI.hostname = DESTINATION;
return fetch(URI, request);
}
Chaika
04/30/2023, 3:27 AMAAAA * 100:: Proxied
Then in a Worker Route, you can make a route *.example.com/*
(or you can just use */*
to match everything).
This only works with Worker Routes though, not custom domains, and for each subdomain you want to use normally, you'll need to add a worker route with none (ex. usefulsubdomain.example.com/*
Service: None
)
This also is only going to work with first level subdomains on free, as the SSL cert you have won't cover any deeper subdomainsSerby
04/30/2023, 3:35 AM*
"sub". mydomain .com and the response is going to just be my html template + injecting the `*`"sub" domain and returning it to the client as "whateverTheyEntered".mydomain.com