<script setup>
import PopupLayout from "@/layouts/PopupLayout.vue";
import ctxRef from "@/utils/ctx_ref.js"
import Context from "./updateCORSPopup.js"
import PostForm from "@/components/form/PostForm.vue";
import SubmitButton from "@/components/form/SubmitButton.vue";
import HTTPCORSHeaderConfigBox from "@/components/server/HTTPCORSHeaderConfigBox.vue";

const ctx = ctxRef(new Context())

</script>

<template>
	<PopupLayout>
		<header>CORS跨域设置</header>
		<PostForm action="$" @success="ctx.success">
			<input type="hidden" name="headerPolicyId" :value="ctx.headerPolicyId"/>
			<HTTPCORSHeaderConfigBox v-model="ctx.cors"></HTTPCORSHeaderConfigBox>
			<SubmitButton></SubmitButton>
		</PostForm>
	</PopupLayout>
</template>

<style lang="postcss" scoped>
</style>