Skip to content

Commit

Permalink
feat: cookie protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtrazy committed Aug 6, 2024
1 parent d77835c commit eceff93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ import EditInventory from '@/pages/Storekeeper/EditInventory';
import ViewGrnByCollection from '@/pages/Storekeeper/GrnListByCollection';

const { refresh } = useAuth();
const cookieProtocol = (import.meta as any).env.VITE_COOKIE_PROTOCOL;

const store = createStore({
authName: '_auth',
authType: 'cookie',
cookieDomain: window.location.hostname,
cookieSecure: window.location.protocol === 'http:',
cookieSecure: window.location.protocol === cookieProtocol,
refresh: refresh,
});

Expand Down

0 comments on commit eceff93

Please sign in to comment.