-
I think it might be related to CORS. I use docker-compose to start the backend, here's my configuration: version: "2"
services:
remark:
build: .
image: umputun/remark42:latest
container_name: "remark42"
hostname: "remark42"
restart: always
ports:
- "3002:8080"
environment:
- REMARK_URL=http://remark42.chenhe.me
- SITE=chenhe_blog
- SECRET=xxxxxxx
- STORE_BOLT_PATH=/srv/var/db
- BACKUP_PATH=/srv/var/backup
- DEBUG=true
- AUTH_ANON=true
- AUTH_GITHUB_CID=xxxxx
- AUTH_GITHUB_CSEC=xxxx
volumes:
- ./var:/srv/var As you can see, it maps host's 3002 port. I have a Nginx as a reverse proxy to 3002. There is no extra CORS configuration.
My main website is var remark_config = {
host: "http://remark42.chenhe.me",
site_id: 'chenhe_blog',
components: ['embed'],
}; The sign in of anonymous is successful, and I get the cookie. But I can't send the comment and it says 'Not authorized'. From the dev tools, it seems that no cookie have been submitted to the server. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I don't think it is CORS issue, or at least CORS is not the only issue here. The direct access to http://remark42.chenhe.me/web/ testing page having the same issue |
Beta Was this translation helpful? Give feedback.
-
It's my fault, I apologize. After being deployed to the server, it is successful. But there's one last question. It does not work on the local web server (hugo embedded). It means the url of main site is The result is 401, the same as the screenshot at the beginning. Is this a expected behavior? @umputun |
Beta Was this translation helpful? Give feedback.
It's my fault, I apologize. After being deployed to the server, it is successful. But there's one last question.
It does not work on the local web server (hugo embedded). It means the url of main site is
http://localhost:1313/***
. In this environment, both site's config and remark42 backend's config arehttp
, nothttps
, so there's no problem with the schema.The result is 401, the same as the screenshot at the beginning. Is this a expected behavior? @umputun