GitLab Pages CORS error after cookie(600) expire
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
Expectations
What are we expecting to happen?
What might happen if this goes wrong?
Rollout Steps
-
Temporarily enable with environment variable: Link to the MR -
Enable by default (optional): Link to the MR -
Remove the feature flag: Link to the MR
Rollback Considerations/Events
-
Disabling with environment variable: Link to the MR -
Remove the feature flag: Link to the MR