You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "gk0307 (via GitHub)" <gi...@apache.org> on 2023/03/02 10:34:39 UTC
[GitHub] [pulsar] gk0307 opened a new issue, #19694: Cors issue
gk0307 opened a new issue, #19694:
URL: https://github.com/apache/pulsar/issues/19694
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
using the 2.10 version
### Minimal reproduce step
We are creating a react Application for publishing the message in the topic using the post **https://pulsar.apache.org/docs/next/client-libraries-rest/** method but we are facing a Cors issue. Tried to fix that issue by changing the configuration files using the following steps:
1. we are changing the **broker.config** file add set Access-Control-Allow-Origin "*".
2. Also change **standalone.conf** file add allowedOrigins=http://192.168.0.181:8080/, http://192.168.0.181:5174/. and # Enable the WebSocket API service in broker
webSocketServiceEnabled=true
But we can't publish the message on that topic.
Error:
````
Access to XMLHttpRequest at 'http://192.168.0.181/topics/persistent/dev/compsource/policy_change_stat' from origin 'http://192.168.0.181:5174' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
````
Request Header:
Request URL: http://192.168.0.181/topics/persistent/dev/compsource/policy_change_stat
Referrer Policy: strict-origin-when-cross-origin
### What did you expect to see?
It should allow to connect and publish the message in that topic
### What did you see instead?
Getting cors error in the post method when we send to the pulsar topic
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on issue #19694: Cors issue
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #19694:
URL: https://github.com/apache/pulsar/issues/19694#issuecomment-1546813342
Closing as stale. If it's still relevant to maintained versions, feel free to open a new issue with reproduce.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #19694: Cors issue
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19694:
URL: https://github.com/apache/pulsar/issues/19694#issuecomment-1493196949
The issue had no activity for 30 days, mark with Stale label.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun closed issue #19694: Cors issue
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun closed issue #19694: Cors issue
URL: https://github.com/apache/pulsar/issues/19694
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on issue #19694: Cors issue
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #19694:
URL: https://github.com/apache/pulsar/issues/19694#issuecomment-1507881728
@gk0307 Can you provide a minimal reproduce repo? I don't find `Access-Control-Allow-Origin` config in broker.conf and also other configs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org