• geoserver 跨域问题


    此解决方案针对在tomcat下通过geoserver.war包部署的方法

    (该流程从别人处复制,仅为自己记忆)
    1、下载cors-filter-2.6.jar、java-property-utils-1.13.jar两个文件,放到.geoserverWEB-INFlib目录下

    2、将以下配置放到geoserverWEB-INF目录下的web.xml文件

    <filter>         
        <filter-name>CORS</filter-name>  
        <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>  
        <init-param>  
         <param-name>cors.allowOrigin</param-name>  
            <param-value>*</param-value>  
        </init-param>  
        <init-param>  
         <param-name>cors.supportedMethods</param-name>  
            <param-value>GET, POST, HEAD, PUT, DELETE</param-value>  
        </init-param>  
        <init-param>  
         <param-name>cors.supportedHeaders</param-name>  
            <param-value>Accept, Origin, X-Requested-With, Content-Type, Last-Modified</param-value>  
        </init-param>  
        <init-param>  
            <param-name>cors.exposedHeaders</param-name>  
            <param-value>Set-Cookie</param-value>  
        </init-param>  
        <init-param>  
            <param-name>cors.supportsCredentials</param-name>  
            <param-value>true</param-value>  
        </init-param>  
    </filter>  
      
    <filter-mapping>  
        <filter-name>CORS</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>
  • 相关阅读:
    两排滚动js
    弹性布局
    channelartlist添加栏目链接
    首页调取二级、三级栏目
    dede完美分页样式
    如何安装sass
    首页分页(自由列表)
    tag标签调取
    25.简单的路由
    24.简单的自定义服务
  • 原文地址:https://www.cnblogs.com/gregcn/p/10240699.html
Copyright © 2020-2023  润新知