BryceWray
05/11/2023, 2:54 AM_middleware.js
stuff for the first time with CF Pages, in an attempt to use it instead of an existing CF Worker. Works perfectly on the pages.dev
version — but, on the custom-domain version from that pages.dev
, only the HTML files are affected even though it’s for all routes and files. Is there something special I have to do in the domain’s DNS, or elsewhere, to make the middleware work properly on the custom domain, too? (And I did remove the custom domain’s routes from the Worker for the test, so the Worker shouldn’t have been interfering.)
The pages.dev
domain = static-site-2to.pages.dev
The custom domain = brycewray.com
**Note**: I have had to add the custom domain routes back to the Worker and take the _middleware.js
file out of the project in order to regain the previous functionality, until I can learn why the middleware file doesn’t work on the custom domain. Let me know (during U.S. daytime hours, please) if you want me to restore the test setup.