itwanger / itwanger/paicoding

forum和admin可以部署在不同的主机上吗?

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss
Dominant language
Java
Stars
3.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

今天试了下把paicoding部署到另一台机器上,在本地只跑一个admin,登录会报跨域错误。

.env.development

# 本地环境
NODE_ENV = 'development'

# 本地环境接口地址
VITE_API_URL = 'http://otherhost:8080/api/admin'

# 本地环境下的域名,如果 8080 端口没有占用的话,会变,注意调整
VITE_DOMAIN = http://otherhost:8080

是要在forum的代码里设置CORS吗?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the cross-origin login failure with the shown .env.development values, keeping admin local and forum on another host. Trace the request from the admin to the forum API and determine which side is responsible for CORS; done means this split deployment can complete login without the reported cross-origin error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot, vite
Domain
api, backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.