This commit is contained in:
小赵同学 committed 2024-11-13 09:21:28 +08:00
1 parent 47ca618cc7
commit aee58b203f
6 files changed
+66

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/blog.iml" filepath="$PROJECT_DIR$/.idea/blog.iml" />
</modules>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+35
View File
@@ -0,0 +1,35 @@
---
title: "解决webstorm本地调试跨域问题"
date: "2024-11-13T09:03:25+08:00"
slug: "20241113-hello-webstorm"
draft: false
categories: []
tags: []
author: "小赵同学"
layout: "post"
status: "hidden"
categories: ["笔记"]
tags: []
---
在b站刷到一个up主,才知道[JetBrains](https://www.jetbrains.com/idea/)的webstorm开始免费了
抱着试一试的心情下载了一下,使用体验很不错,只需要下载下来,即开即用
不需要下载安装什么插件,进行扩展,而且操作界面和idea界面很相似,熟悉上手很快
比如最喜欢的就是`变量名.let`的快捷键,可以快捷生成 `let example = xxx`,虽然vscode可以通过插件实现,但是体验感还是很一般
下午在背js面试题的时候,使用fetch发送get请求,一直报跨域问题
我就纳闷了,一些公开的api网站怎么可能设置跨域访问,不然还咋赚钱
于是排查了一下是webstorm的编辑器问题,去Google搜索也没有靠谱的回答
最后摸索到了解决方法,这里分享一下解决方法
方法很简单,就是去settings将下图勾选即可
![0839c79d4896e0ccf9e6309d50d3091](\pics\hugo\hello-webstorm\0839c79d4896e0ccf9e6309d50d3091.png)
默认是不勾选的,勾选上,前端跨域问题就解决了
Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB