When accessed from internal JS, the route is routed by Vue-router. 内部JSのアクセスでアクセスした際に、Vue-routerでルーティングされてしまう問題 #2338
-
|
When accessed from internal JS, the route is routed by Vue-router. My system uses a Vue.js SPA application on the front end and a Rails API server on the back end. Vue.js deploys the built files to S3, and the backend API server runs in a Fargate container. Path allocation is done with CloudFront, with DOMAIN/api/* being sent to the backend and root access being sent to S3. The problem is that when Vue.js accesses the backend API via GET, the Vue.js Router processes the request and returns a response with a path that does not exist. Specifically, the problem is as follows: This is a very puzzling operation, and I don't know what's going on. 私のシステムでは、フロントエンドにVue.jsのSPAアプリケーション、バックエンドにRailsのAPIサーバーを利用しています。 具体的に起きている現象は以下のような状況です。 非常に不可解な動作で、何が起きているかわかりません。 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
The cause of the problem was not Vue-router, but CloudFront, where the routing was configured. |
Beta Was this translation helpful? Give feedback.
-
|
That may be a common problem which caused by HTML5-mode. If you are using hash mode, there is no need to configure proxy. 😄 |
Beta Was this translation helpful? Give feedback.
The cause of the problem was not Vue-router, but CloudFront, where the routing was configured.
We apologize for the inconvenience.
問題の原因は、Vue-routerではなく、ルーティングを設定しているCloudFrontにありました。
ご迷惑をおかけしました。