GitLab Pages CORS error after cookie(600) expire
<!-- Title suggestion: [feature flag name] Enable description of feature -->
## Summary
Hi,When I deployed the pages feature on gitlab, it worked fine, but when I clicked the button again on the current page 10 minutes later, occur an error (CORE erro) appeared. Similarly, I switched to a self-managed gitlab instance and found that the cookie parameter was not valid by modifying it. Is there any other way to solve this cookie expiration problem? I am looking forward to your reply very much.
The following screenshot shows an error:


And then when I hit F5, the problem doesn't appear。

Source of code:https://gitlab.com/adamibs/docsify-preview-example # https://adambenshmuel.medium.com/deploy-docsify-js-using-gitlab-pages-and-a-preview-environment-415de74592fd
my code address: https://gitlab.com/ops888/pages.git
.gitlab-ci.yml configuration:
```
stages:
- test
- deploy
pages:
image:
name: cirocosta/alpine-envsubst:latest
entrypoint: [""]
variables:
DOCSIFY_BASE_PATH: https://ops888.gitlab.io/pages/docs
docsify: $docsify
stage: deploy
script:
- mkdir .public
- mv index.html .index.html
- envsubst < ".index.html" > "index.html"
- rm -f .index.html
- cp -r * .public
- mv .public public
- ls
artifacts:
paths:
- public
only:
- main
"Create Preview Environment":
extends: pages
variables:
DOCSIFY_BASE_PATH: https://ops888.gitlab.io/-/pages/-/jobs/$CI_JOB_ID/artifacts/public/docs
script:
- mkdir .public
- envsubst < "index.html" > ".index.html"
- envsubst < ".index.html" > "index.html"
- rm -f .index.html
- cp -r * .public
- mv .public public
stage: test
only:
- main
```
<!-- Short description of what the feature is about and link to relevant other issues. -->
## Expectations
### What are we expecting to happen?
<!-- Describe the expected outcome when rolling out this feature -->
### What might happen if this goes wrong?
<!-- Should the feature flag be turned off? Any MRs that need to be rolled back? Communication that needs to happen? What are some things you can think of that could go wrong - data loss or broken pages? -->
## Rollout Steps
- [ ] Temporarily enable with environment variable: [Link to the MR](https://gitlab.com) <!-- similar to https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/merge_requests/1500 -->
- [ ] Enable by default (optional): [Link to the MR](https://gitlab.com) <!-- similar to https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/807 -->
- [ ] Remove the feature flag: [Link to the MR](https://gitlab.com) <!-- similar to https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/694 -->
## Rollback Considerations/Events
<!-- List all the important considerations if the feature flag is rollback or if the feature is removed -->
- [ ] Disabling with environment variable: [Link to the MR](https://gitlab.com)
- [ ] Remove the feature flag: [Link to the MR](https://gitlab.com)
<!-- Required Labels: Do not remove -->
issue