mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 06:10:26 +08:00
34 lines
689 B
JavaScript
34 lines
689 B
JavaScript
Vue.component("http-cors-header-config-box", {
|
|
props: ["value"],
|
|
data: function () {
|
|
let config = this.value
|
|
if (config == null) {
|
|
config = {
|
|
isOn: false,
|
|
allowMethods: [],
|
|
allowOrigin: "",
|
|
allowCredentials: false,
|
|
exposeHeaders: [],
|
|
maxAge: 0,
|
|
requestHeaders: [],
|
|
requestMethod: ""
|
|
}
|
|
}
|
|
|
|
return {
|
|
config: config
|
|
}
|
|
},
|
|
template: `<div>
|
|
<input type="hidden" name="corsJSON" :value="JSON.stringify(config)"/>
|
|
<table class="ui table definition selectable">
|
|
<tr>
|
|
<td class="title">启用CORS自适应跨域</td>
|
|
<td>
|
|
<checkbox v-model="config.isOn"></checkbox>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="margin"></div>
|
|
</div>`
|
|
}) |