package gaf3.core.cloud.web

import org.springframework.boot.context.properties.ConfigurationProperties

@ConfigurationProperties(prefix = "gaf.web.spa")
class GafSpaConfigure {

    /**
     * 是否启用SPA处理
     */
    var enabled: Boolean = true

    /**
     * 启用默认index处理的web路径
     */
    var indexPaths: Array<String> = emptyArray()
        set(value) {
            field = value.filter { !it.isBlank() }
                    .map { if(it.endsWith("/")) it.substring(0, it.length-1) else it }
                    .toTypedArray()
        }

    /**
     * index文件名
     */
    var indexFile: String = "index.html"

}