1import{_ as y,h as a,b as c,d as m,f as r,j as o,e as f,w as p,$ as h,F as _}from"./main-fn-yY0Qx.js";const E={props:{plugin:{type:Object,required:!0},settings:{type:Object,required:!0}},emits:["update:settings"],computed:{isBound(){return this.settings.publicData.globalHeaders&&!Array.isArray(this.settings.publicData.globalHeaders)}},methods:{async updatePublicSettings(i,e){this.$emit("update:settings",{...this.settings,publicData:{...this.settings.publicData,[i]:e}})}}},k={key:0,class:"mb-3 label-sm text-blue-500 flex items-center"},V={class:"flex items-center"};function x(i,e,s,C,H,l){const n=a("wwEditorInputRow"),b=a("wwEditorIcon"),w=a("wwEditorInputSwitch"),g=a("wwEditorQuestionMark"),v=a("wwEditorFormRow");return m(),c(_,null,[e[5]||(e[5]=r("div",{class:"mb-3 label-sm text-stale-500"}," Global headers will be applied to each request made to your Xano server from the browser side. ",-1)),o(n,{label:"Headers",type:"array","model-value":s.settings.publicData.globalHeaders,bindable:"","onUpdate:modelValue":e[0]||(e[0]=t=>l.updatePublicSettings("globalHeaders",t)),onAddItem:e[1]||(e[1]=t=>l.updatePublicSettings("globalHeaders",[...s.settings.publicData.globalHeaders||[],{}]))},{default:p(({item:t,setItem:u})=>[o(n,{type:"query","model-value":t.key,label:"Key",placeholder:"Enter a value",small:"",bindable:"","onUpdate:modelValue":d=>u({...t,key:d})},null,8,["model-value","onUpdate:modelValue"]),o(n,{type:"query","model-value":t.value,label:"Value",placeholder:"Enter a value",small:"",bindable:"","onUpdate:modelValue":d=>u({...t,value:d})},null,8,["model-value","onUpdate:modelValue"])]),_:1},8,["model-value"]),l.isBound?(m(),c("div",k,[o(b,{name:"information-circle",class:"mr-1"}),e[3]||(e[3]=h(" Format => [{key: 'MyHeaderName', value: 'MyHeaderValue'}] "))])):f("",!0),o(v,null,{default:p(()=>[r("div",V,[o(w,{"model-value":s.settings.publicData.withCredentials,"onUpdate:modelValue":e[2]||(e[2]=t=>l.updatePublicSettings("withCredentials",t))},null,8,["model-value"]),e[4]||(e[4]=r("div",{class:"body-sm ml-2"},"Include credentials (cookies)",-1)),o(g,{"tooltip-position":"top-left","forced-content":"Cookies will be sent automatically. Your Xano endpoint API group need to have CORS configured with the proper header for this to works. 1) Access-Control-Allow-Credentials must be true, 2) Access-Control-Allow-Origin must be set to your editor and production link, not wildcard. [See Xano documentation](https://docs.xano.com/api/the-basics/api-groups#cors-management)",class:"ml-auto text-stale-500"})])]),_:1})],64)}const S=y(E,[["render",x],["__scopeId","data-v-25969570"]]);export{S as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.